% I am facing the that Utt for n=5 replacing the others, so I am unable to call the previous value of Utt for n=1,2,3, and 4 .
for i=1:1:10
for n=1:1:5
if n==1
Utt(:,i+1)=([zeros(3,1); utdelt(1:3,i+1)]); % utdelt (15X10)
else
d1=1+(n-2)*3;
d2=6+(n-2)*3;
Utt(:,i+1)=utdelt(d1:d2,i+1);
end
end
end

5 件のコメント

Chaudhary P Patel
Chaudhary P Patel 2022 年 6 月 6 日
@Stephen23 sir, just suggest me how can i restore Utt for all value of n without replacing. which i can call for further use.
Stephen23
Stephen23 2022 年 6 月 6 日
" how can i restore Utt for all value of n without replacing"
Include the n index into your output array.
Image Analyst
Image Analyst 2022 年 6 月 6 日
"how can i restore Utt for all value of n" << try
UttCopy = Utt;
% for loop code, then
% Restore Utt for all n
Utt = UttCopy;
Chaudhary P Patel
Chaudhary P Patel 2022 年 6 月 7 日
Utt=UttCopy;
Sir, this command is not working.
it is replaced by the end value of n.

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2022 年 6 月 6 日

0 投票

Either add n as an index to the array, or else do calculations similar to the d1 d2 to determine where to write into.
My recommendation would be to use the extra index

その他の回答 (0 件)

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by