saveresultinfile.m

来自「利用gps多天线载波相位技术」· M 代码 · 共 29 行

M
29
字号
%%========================================
%%     Toolbox for attitude determination
%%     Zhen Dai
%%     dai@zess.uni-siegen.de
%%     ZESS, University of Siegen, Germany
%%     Last Modified  : 1.Sep.2008
%%========================================
%% Functions:
%%      Save the attitude result into a data file
%% Input parameters:
%%     mAttitude -> attitude parameters of each epoch
%%     mEpochStr -> epoch expressed in STRING
%%     title_str -> title of the result
%%     filename -> name of the file to be written
%% Output:
%%       Saved in a data file 

function SaveResultInFile(mAttitude,mEpochStr, title_str,filename)
 
totalepoch=size(mAttitude,1);
fid=fopen(filename,'at');
fprintf(fid,'\n%s\n\n',title_str);
for epoch=1:1:totalepoch,
    epoch_str=mEpochStr{epoch};
    str=sprintf('At Epoch %s -> YAW=%3.3f  ROLL=%3.3f  PITCH=%3.3f', ...
        epoch_str, mAttitude(epoch,1),mAttitude(epoch,2),mAttitude(epoch,3));
    fprintf(fid,'%s\n',str); 
end
fclose(fid);

⌨️ 快捷键说明

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