Hi all
How to plot the data which is in cell arrays? When I use plot I get the following error.
"Conversion to double from cell is not possible"
Thanks in advance
Sreenu

 Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Feb. de 2012

2 votos

You cannot plot data that is in cell arrays. Extract the data from the cell arrays and plot that. For example,
plot(MyCell{2,5}, MyCell{3,7})

3 comentarios

KSSV
KSSV el 6 de Feb. de 2012
Hi Walter.........
First Congratulations on your MATLAB skills. I checked you have answered many many questions. You have answered my questions too, which were very helpful. Thanking you for that..
Coming about this question. I have many cell arrays around 10,000 in numbers. I tried plot(x{:},y{:}). But this plot is ugly. The plot happens to be filled with color and shows only one region. Actually plot has curves with bounded and unbounded regions. I want to plot these curves and fill color in it...
How to manage this ??
Thanks a lot once again..
Sreenu
Logabharathi Aruchamy
Logabharathi Aruchamy el 11 de Abr. de 2012
It helped me a lot. thanks a lot Walter!
PRASHANT TIWARI
PRASHANT TIWARI el 5 de Mzo. de 2022
Editada: PRASHANT TIWARI el 5 de Mzo. de 2022
What if they are in loop.
Stress{i} = [Stress_local{i}(1,1)]
Strain{i} = [Strain_local{i}(1,1)]
on plotting it shows only last ith point.

Iniciar sesión para comentar.

Más respuestas (2)

Jorge Alliende
Jorge Alliende el 28 de Mzo. de 2014
Editada: Jorge Alliende el 28 de Mzo. de 2014

5 votos

You can plot your cell data in this way:
figure;
hold on;
cellfun(@plot,MyCell);
Best
Jorge

1 comentario

PRASHANT TIWARI
PRASHANT TIWARI el 5 de Mzo. de 2022
Stress_local{i}(1,1)
Strain_local{i}(1,1)
how to plot for Stress_local{i}(1,1) vs Strain_local{i}(1,1) for each i value not only last value.

Iniciar sesión para comentar.

Jy Lee
Jy Lee el 31 de Mayo de 2022

0 votos

Everyone, understand question?

Categorías

Etiquetas

Preguntada:

el 6 de Feb. de 2012

Respondida:

el 31 de Mayo de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by