📄 createreportmex.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: CreateReportMEX.m.rca $
% $Revision: 1.2 $
% $Date: Mon Dec 11 12:06:27 2006 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% creates report for the current MEX module
%
% INPUT ARGUMENTS
% ModuleName : input string for creating file name
% s1 : input string1 to write down in selected file
% s2 : input string2 to write down in selected file
% s3 : input string3 to write down in selected file
%
% OUTPUT ARGUMENTS
% status : (optional) status
function status=CreateReportMEX(ModuleName,s1,s2,s3)
status=0;
file = ['reportMEX_' ModuleName '.txt'];
if exist(file)
delete(file)
disp(['Updating ' file])
else
disp(['Creating ' file])
end
fid=fopen(file,'w');
%fid=fopen(file,'a');
fprintf(fid,[file '\n']);
fprintf(fid,['' '\n']);
fprintf(fid,['Matlab version used: ' version '\n']);
if ispc %Little Endian on pc
additionalInfo=' (Little Endian)';
else %Big Endian elsewhere
additionalInfo=' (Big Endian)';
end
fprintf(fid,['Platform used: ' computer additionalInfo '\n']);
c=clock;
fprintf(fid,['Created on: ' date sprintf('-%.0fh',c(4)) sprintf('-%.0fmin',c(5)) sprintf('-%.0fsec',c(6)) '\n']);
fprintf(fid,['' '\n']);
fprintf(fid,[s1 '\n']);
fprintf(fid,[s2 '\n']);
fprintf(fid,[s3 '\n']);
status = fclose(fid); % close file other access might be denied next time
status=1; %reach this point if openning/writing/closing went ok
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -