필터 지우기
필터 지우기

How to save column values as Mat file in for Loop

조회 수: 2 (최근 30일)
Med Future
Med Future 2022년 2월 7일
댓글: Benjamin Thompson 2022년 2월 10일
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
Benjamin Thompson 2022년 2월 8일
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
  댓글 수: 1
Benjamin Thompson
Benjamin Thompson 2022년 2월 10일
Has your question been answered? If so, please accept the answer.

댓글을 달려면 로그인하십시오.

추가 답변 (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