필터 지우기
필터 지우기

How to auto change save file name with For loop

조회 수: 1 (최근 30일)
minsick
minsick 2020년 4월 8일
댓글: minsick 2020년 4월 8일
I am looking for how to auto change save file name with For loop
N = 6;
for k = 1:N
F = sprintf('RR.data.%u',k);
C{k} = dlmread(F)
data = vertcat(C{:}); % <-- data is input
% After processing
%
% processing output is result
result = output % <-- how to auto change save file name with For loop
The result files overlap. that is why i ask
  댓글 수: 2
Guillaume
Guillaume 2020년 4월 8일
I don't understand your question. Your code doesn't save anything. On the other hand, you're reading files whose name you're already changing.
It's also unclear why the vertcat(C{:}) is inside the k loop and what 'output of data' mean.
minsick
minsick 2020년 4월 8일
I changed something please reconfirm. That is just example. I am looking for how to auto change save file name

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

답변 (1개)

Aoi Midori
Aoi Midori 2020년 4월 8일
Do you mean this?
result(k) = output

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by