how to plot different cell arrays in just one graphic?

1 visualización (últimos 30 días)
Fercho_Sala
Fercho_Sala el 22 de Jun. de 2021
Comentada: Fercho_Sala el 24 de Jun. de 2021
Probably it could be a tricky question... however : having 2 different cell arrays, how can I plot the first cell (of the first array) and then the first cell (of the second array) consecutively and create a general plot in the same way for the other cells? , all together in a plot. Thanks.

Respuesta aceptada

Walter Roberson
Walter Roberson el 22 de Jun. de 2021
temp = [reshape(First, 1, []);
reshape(Second, 1,[])];
plot(temp{:})
  5 comentarios
Walter Roberson
Walter Roberson el 24 de Jun. de 2021
maxinter = min(length(S), length(S7));
SS = [reshape([S(1:maxinter); S7(1:maxinter)], 1, []), S(maxinter+1:end), S7(maxinter+1:end)];
This code is valid no matter whether S or S7 is the longer vector, as long as both of them are row vectors.
Fercho_Sala
Fercho_Sala el 24 de Jun. de 2021
@Walter Roberson yes, it works perfectly, thank's a lot for your knowledge :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by