MATLAB Answers

0

How to do a matrix like this??

Asked by fafa fafa on 16 Sep 2019
Latest activity Commented on by 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.

Tags

Products

1 Answer

Answer by Bruno Luong
on 16 Sep 2019
Edited by Bruno Luong
on 16 Sep 2019
 Accepted Answer

(1:10).^((1:3)')
or on older MATLAB
bsxfun(@power,1:10,(1:3)')

  1 Comment

fafa fafa on 16 Sep 2019
thx a lot

Sign in to comment.