Basic 2D graph from 3D matrix?

19 views (last 30 days)
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?

Accepted Answer

Jonathan Sullivan
Jonathan Sullivan on 2 Apr 2012
plot(squeeze(A(1,1,:)))

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!