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 CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by