for loop

4 ビュー (過去 30 日間)
mahaveer hanuman
mahaveer hanuman 2011 年 7 月 30 日
i have a=2x10 i need to use second row element how can i do it
i=1:length(a) i get elements of first row then how abt second row
please help me

採用された回答

Paulo Silva
Paulo Silva 2011 年 7 月 30 日
a(1,:) %first row
a(2,:) %second row

その他の回答 (1 件)

mahaveer hanuman
mahaveer hanuman 2011 年 7 月 30 日
num = 100; source = randint(num,2);
i =num(1,:); j =num(2,:); parity = mod(source(i)+ source(j),2); index out of bound
  1 件のコメント
Paulo Silva
Paulo Silva 2011 年 7 月 30 日
good luck getting the second row from a scalar value like the one from num

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

カテゴリ

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