I have a function in matlab.
function [MEAN STD]=result(data)
MEAN=mean(data);
STD=std(data);
savefilename=sprintf('%s',data)
save(savefilename,'MEAN','STD')
end
i set data's filename=ET1_A_l1(imported to workspace alrdy)(ET1_A_l1=[1;2;1;3;1;4] to find the mean and std of selected data(ET1_A_l1),and save the statistical feature into .mat form as shown in below:
>>[MEAN STD]=result(ET1_A_l1)
As a result, the name of save file is 121314.mat,and it is not 'ET1_A_l1',is there any good idea of using MATLAB's efficient code to change the filename correctly?
Thanks