How to save column values as Mat file in for Loop

2 次查看(过去 30 天)
Hi all, i hope you are doing well
i have the code, the frameread has shape 1024x9999,
i want to save the 1024 value of every column in seprate mat file in MATLAB how can i do that
dataDirectory='C:\Users\DELL\Documents\MATLAB\Examples\R2021b\deeplearning_shared\ModulationClassification'
fileNameRoot = "frame";
for p=1:length(frameread)
% Remove transients from the beginning, trim to size, and normalize
frameread = helperModClassFrameGenerator(S, spf, spf, transDelay, sps);
% Save data file
fileName = fullfile(dataDirectory,...
sprintf("%s%s%03d",fileNameRoot,'MOD',p));
save(fileName,"frame")
end

采纳的回答

Benjamin Thompson
Some possible changes are in bold text below. Hard to be sure without all the data and code.
dataDirectory='C:\Users\DELL\Documents\MATLAB\Examples\R2021b\deeplearning_shared\ModulationClassification'
fileNameRoot = "frame";
frameread = helperModClassFrameGenerator(S, spf, spf, transDelay, sps);
for p=1:size(frameread,2)
% Remove transients from the beginning, trim to size, and normalize
% Save data file
fileName = fullfile(dataDirectory,...
sprintf("%s%s%04d",fileNameRoot,'MOD',p));
save fileName frameread(:,p)
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by