Effacer les filtres
Effacer les filtres

Basic 2D graph from 3D matrix?

26 vues (au cours des 30 derniers jours)
Joon Jeon
Joon Jeon le 2 Avr 2012
I just began to use 3D matrix and have a problem when plotting it.
I have a matrix of 2 by 2 by 10. It is that I have 10 pages of 2 by 2 two dimension matrix.
And I want to plot (1,1,:) versus 1:1:10.
So what I tried is
plot(t, A(1,1,:))
where t is 1:1:10.
But it says dimension is not matching.
So I tried
AA(:,1)=A(1,1,:)
to allocate (1,1) element in each paper to AA.
And it didn't work.
Is there any way to plot this?

Réponse acceptée

Jonathan Sullivan
Jonathan Sullivan le 2 Avr 2012
plot(squeeze(A(1,1,:)))

Plus de réponses (0)

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by