Borrar filtros
Borrar filtros

Error using reshape pls help me

1 visualización (últimos 30 días)
nora elfiky
nora elfiky el 22 de Abr. de 2017
Comentada: Star Strider el 23 de Abr. de 2017
appear this error how I can solve it Can you help me solve this problem? size MINO 1x524286
>>ppn=bin2dec(reshape(MINO,8,[]).')'; Error Product of known dimensions, 8, not divisible into total number of elements, 524286.

Respuesta aceptada

Star Strider
Star Strider el 22 de Abr. de 2017
One way to solve that is to zero-pad it with leading zeros:
MINO = rand(1,524286);
L8 = length(MINO)/8;
Ld = 8*ceil(L8);
MINO_reshaped = reshape([zeros(1, Ld-L8*8) MINO], 8, []);
  2 comentarios
nora elfiky
nora elfiky el 23 de Abr. de 2017
thnx
Star Strider
Star Strider el 23 de Abr. de 2017
My pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by