how to do this
1 回表示 (過去 30 日間)
古いコメントを表示
if I have i = 1:12 , j= 1:12 and I want to get a table with A(i,j) , how I will do it
2 件のコメント
Igor de Britto
2012 年 3 月 8 日
I don't get your question. Wich values do you want to populate this square matrix? Or do you want a lot of matrices with all the size combinations?
回答 (3 件)
Walter Roberson
2012 年 3 月 8 日
What do you mean by a "table" in this context? Something displayed to the command window? A uitable() ? An array with 3 columns, the first for i, the second for j, and the third for A(i,j) ?
When you speak of A(i,j) do you mean A(1:12,1:12), or do you mean A(i(1),j(1)) A(i(2),j(2)), A(i(3),i(3)) and so on? If you do then
A(subs2ind(size(A), i, j))
5 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!