フィルターのクリア

save for loop resutls

2 ビュー (過去 30 日間)
heir ancestors
heir ancestors 2017 年 6 月 19 日
コメント済み: heir ancestors 2017 年 6 月 21 日
hello everybody ,
I have a small code , I want to save the values of ab so in newwidt so that I can call them later newwidt(1) ,newwidt(2) ....etc
Sn is a 7*9 matrix , the results are not saving, I know it false as I wrote (saving part).
[a,b]=size(Sn);
newwidt=zeros(size(Sn));
for i=1:b
ab=repmat(Sn(:,i),1,b)
newwidt=ab(:,:)
end
thanks

採用された回答

aborghes
aborghes 2017 年 6 月 19 日
does changing newwidt=ab(:,:) to newwidt(:)=ab(:,:) do what you are looking for? This saves each value in an array of doubles.
  3 件のコメント
aborghes
aborghes 2017 年 6 月 19 日
sorry about that, i miss-typed. try newwidt(:,:,i). that saves each result in a new array that are all accessible.
heir ancestors
heir ancestors 2017 年 6 月 21 日
Amazing !! it's woking, thank you very much :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by