MATLAB Answers

How do I create a (10,10) matrix containing numbers from 1 to 100?

1.148 views (last 30 days)
How do I create a (10,10) matrix containing numbers from 1 to 100?
I just want the numbers to go 1 to 10 on the top row, then 11-20 on the 2nd row etc.

  2 Comments

Tom
Tom on 18 Sep 2013
I did it using
ij = [1:10 ; 11:20 ; 21:30 ; 31:40 ; 41:50 ; 51:60 ; 61:70 ; 71:80 ; 81:90 ; 91:100]
but Walter's is better obviously. I'm just getting going on my Master's dissertation in Audio Acoustics.

Sign in to comment.

More Answers (1)

SYED ABOU ILTAF HUSSAIN
SYED ABOU ILTAF HUSSAIN on 2 Sep 2018
Edited: SYED ABOU ILTAF HUSSAIN on 2 Sep 2018
Try this a= [1:10]; for i=2:10 a(i,:)=a(i-1,:)+10; end

  0 Comments

Sign in to comment.

Sign in to answer this question.

Products


Translated by