using 3D arrays and manipulating to plot data

조회 수: 3 (최근 30일)
Charalambos
Charalambos 2011년 7월 23일
답변: Larry 2013년 11월 4일
I am using the latest version of MAtlab and trying to manipulate a 3D array. Basically it is something like this I have a 4x4x201 array and when I type the command plot(array(1,1,:)) it comes up with an error Error using ==> plot Data may not have more than 2 dimensions
all I want to do is to display the values long this part of the data. how do I do that? or another problem I have found is how do I cut out the 4x4 part and am left with a 1x201 array. It seems so straight forward what I want to do but i do not seem to know the MATLAB lingo to do it.

답변 (3개)

Walter Roberson
Walter Roberson 2011년 7월 23일
plot(squeeze(array(1,1,:)))

Charalambos
Charalambos 2011년 7월 23일
Thankyou, I beleive this works, I have a 4x4xN array and that works so if I want to plot the array(1,4,:) data I do that plot(squeeze(array(2,4,:))) plot(squeeze(array(3,4,:))) and so on.
Thanks +God bless+

Larry
Larry 2013년 11월 4일
y(1,:)=array(1,1,:); plot(y)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by