フィルターのクリア

How can I add number in the names of the outputs when I use "for" function?

2 ビュー (過去 30 日間)
Alan
Alan 2011 年 9 月 20 日
I want to change the name of a out using "for", i.e.:
I have this function:
for i=NCf
[Xmax,Imax,Xmin,Imin]= extrema(Graph);
end
For each loop I want to change the names of the outputs! Can I use the "for" function to add something in the name of output, i.e: When for i=1 function have this name of outputs:
Xmax1, Imax1, Xmin1, Imin1
when for i=2
Xmax2, Imax2, Xmin2, Imin2
so on....
How can I put this?
Thanks

採用された回答

the cyclist
the cyclist 2011 年 9 月 20 日
The best way to do this is probably via cell arrays:
[Xmax{i},Imax{i},Xmin{i},Imin{i}]= extrema(Graph);
Note the curly brackets.

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 9 月 20 日

カテゴリ

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