MATLAB Answers

How to do a matrix like this??

1 view (last 30 days)
fafa fafa
fafa fafa on 16 Sep 2019
Commented: fafa fafa on 16 Sep 2019
how to do a matrix like this in a loop,[1 2 3 ... 10,
1 4 9 ... 100
1 8 27... 100]

  0 Comments

Sign in to comment.

Accepted Answer

Bruno Luong
Bruno Luong on 16 Sep 2019
Edited: Bruno Luong on 16 Sep 2019
(1:10).^((1:3)')
or on older MATLAB
bsxfun(@power,1:10,(1:3)')

  1 Comment

Sign in to comment.

More Answers (0)

Tags

Products