Borrar filtros
Borrar filtros

if i have matrix i want to convert it to vector?

1 visualización (últimos 30 días)
Firas Al-Kharabsheh
Firas Al-Kharabsheh el 9 de Mayo de 2016
Respondida: Fangjun Jiang el 9 de Mayo de 2016
if i have this matrix
A = [1 2 3
4 5 6
7 8 9]
then i change it to a vector like that
b = reshape(A',1,9);
b = [ 1 2 3 4 5 6 7 8 9]
then how can i convert b vector to A matrix ???

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 9 de Mayo de 2016
transpose(reshape(b,3,[]))

Más respuestas (0)

Categorías

Más información sobre Operators and Elementary Operations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by