I have a function in matlab.
function [MEAN STD]=result(data)
MEAN=[mean(data)];
STD=std(data);
Training_data=[MEAN STD]
savefilename=sprintf('%s',inputname(1))
save(savefilename,'Training_data')
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 ET1_A_l1.mat,and I import ET1_A_l1.mat into the workspace,it shows the 'Training_data' as shown in figure 1..
,
is there any good idea to change the variable name(Training_data) to ET1_A_l1 in workspace??
