フィルターのクリア

Negative index of a matrix

6 ビュー (過去 30 日間)
Burak
Burak 2016 年 8 月 2 日
編集済み: Walter Roberson 2016 年 8 月 4 日
for n=1:5
for m=-n:n
a(m,n)=m*n
end
end
end
I got an equation like this but I got negative indexes , how can I solve this problem? Thanks for helping.

採用された回答

Thorsten
Thorsten 2016 年 8 月 2 日
編集済み: Thorsten 2016 年 8 月 2 日
for n = 1:5
m = -n:n;
for i = 1:numel(m)
A(i, n) = m(i)*n;
end
end
  1 件のコメント
Burak
Burak 2016 年 8 月 2 日
Really thanks , I appreciate.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by