How to do a matrix like this??
1 view (last 30 days)
Show older comments
how to do a matrix like this in a loop,[1 2 3 ... 10,
1 4 9 ... 100
1 8 27... 100]
0 Comments
Accepted Answer
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)')
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!