I have data = [abcd]
and this data is in a loop, in which a
, b
, c
and d
's values change.
for num=START:END
[out1 out2] = some_funstion(input_image);
a = out1+out2;
b = out2-out1; %example
data = [a b];
end
How can I save the whole data and train it?
change your code as the following:
data = [];
for num=START:END
[out1 out2] = some_funstion(input_image);
a = out1+out2;
b = out2-out1;%example
data = [data; a b]; % each row of data will be a and b
end
save('file.mat','data'); % save 'data' in the 'file.mat' file
load('file.mat'); % load 'data' from 'file.mat'.
By the way, in matlab, the comments are followed by '%'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.