How to do a matrix like this??

1 visualización (últimos 30 días)
fafa fafa
fafa fafa el 16 de Sept. de 2019
Comentada: fafa fafa el 16 de Sept. de 2019
how to do a matrix like this in a loop,[1 2 3 ... 10,
1 4 9 ... 100
1 8 27... 100]

Respuesta aceptada

Bruno Luong
Bruno Luong el 16 de Sept. de 2019
Editada: Bruno Luong el 16 de Sept. de 2019
(1:10).^((1:3)')
or on older MATLAB
bsxfun(@power,1:10,(1:3)')

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by