Expanding Array as following;
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
도연 원
el 22 de Sept. de 2022
Comentada: 도연 원
el 24 de Sept. de 2022
Hi, I tried hard solution for this, but I think I can't... Would you please help?
I have logical vector here;
A=[1 0 0 1];
I want to expand this array like this, this is like expanding vector A by 3 times.
B=[1 1 1 0 0 0 0 0 0 1 1 1];
I tried function 'upsample', but it doesn't work as I intended like above.
Also made this logical values into 'double' and used interp1 function, also did not work.
Also searched in the Matlab Community, think that there is 100% matching question wharrich what I am seeking of...
Would you please help?
Thanks!
0 comentarios
Respuesta aceptada
Más respuestas (1)
Cris LaPierre
el 22 de Sept. de 2022
What about this?
A=[1 0 0 1];
B = [A;A;A];
B = B(:)'
0 comentarios
Ver también
Categorías
Más información sobre Matrices and Arrays 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!