write.m

来自「这是支持在MATLAB中进行四元数(哈密顿数)的工具箱」· M 代码 · 共 22 行

M
22
字号
function write(filename, format, a)% WRITE    Output a quaternion array to a text file.%% write(filename, format, a)%% This function writes a text file which is designed to be easily% read into other software, such as Maple, Mathematica, etc.  The% first line of the file contains two integer values giving the% number of rows and columns in the file.  The quaternion values% then follow in raster order, that is with the column index varying% most rapidly. Each quaternion value occupies one line in the file,% and consists of four floating-point values, separated by spaces.%% The format parameter may be omitted, in which case a default is% assumed which outputs sufficient digits to represent double values% with no loss of accuracy. Otherwise the format is a string (see the% standard Matlab function fprintf for details).%% If the parameter a is a pure quaternion, only three components are% written per quaternion.% Copyright 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?