plot cell arrays...

154 visualizzazioni (ultimi 30 giorni)
KSSV
KSSV il 6 Feb 2012
Risposto: Jy Lee il 31 Mag 2022
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

Risposta accettata

Walter Roberson
Walter Roberson il 6 Feb 2012
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 Commenti
Logabharathi Aruchamy
Logabharathi Aruchamy il 11 Apr 2012
It helped me a lot. thanks a lot Walter!
PRASHANT TIWARI
PRASHANT TIWARI il 5 Mar 2022
Modificato: PRASHANT TIWARI il 5 Mar 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.

Accedi per commentare.

Più risposte (2)

Jorge Alliende
Jorge Alliende il 28 Mar 2014
Modificato: Jorge Alliende il 28 Mar 2014
You can plot your cell data in this way:
figure;
hold on;
cellfun(@plot,MyCell);
Best
Jorge
  1 Commento
PRASHANT TIWARI
PRASHANT TIWARI il 5 Mar 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.

Accedi per commentare.


Jy Lee
Jy Lee il 31 Mag 2022
Everyone, understand question?

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by