matrix row, column change

2 visualizaciones (últimos 30 días)
형준 이
형준 이 el 23 de Dic. de 2021
Comentada: 형준 이 el 24 de Dic. de 2021
i'm not good at matlab...
question : if E1 = 800 X 1 matrix, and i want E_VV = 20 X 40 matrix
what is the simple code to change E1 to E_VV ??
my code : E_VV = [E1(1:20,1),E1(21:40,1),E1(41:60,1),E1(61:80,1),E1(81:100,1),E1(101:120,1),E1(121:140,1),E1(141:160,1),E1(161:180,1),E1(181:200,1),E1(201:220,1),E1(221:240,1),E1(241:260,1),E1(261:280,1),E1(281:300,1),E1(301:320,1),E1(321:340,1),E1(341:360,1),E1(361:380,1),E1(381:400,1),E1(401:420,1),E1(421:440,1),E1(441:460,1),E1(461:480,1),E1(481:500,1),E1(501:520,1),E1(521:540,1),E1(541:560,1),E1(561:580,1),E1(581:600,1),E1(601:620,1),E1(621:640,1),E1(641:660,1),E1(661:680,1),E1(681:700,1),E1(701:720,1),E1(721:740,1),E1(741:760,1),E1(761:780,1),E1(781:800,1)];
i think this code is very long and not simple

Respuesta aceptada

KSSV
KSSV el 23 de Dic. de 2021
E = rand(800,1) ;
iwant = reshape(E,20,40) ;

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices 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