how to do pcolor plots?

조회 수: 5 (최근 30일)
Lilya
Lilya 2018년 10월 8일
댓글: Lilya 2018년 10월 9일
Hi all,
I've attached an example of the plot that I want to make it. it shows on x-axis = depth y-axis = time z-axis = temperature. the mother matrices have the same dimensions (251*28*10) I need also to extract the 5th column from all of it (251*5*10) the result previous matrix what I want to plot if with pcolor
any help will be appreciated :(
thanks
  댓글 수: 3
jonas
jonas 2018년 10월 8일
+1, you'll have to provide some data and tell us what that data represents. Normally you see data sets with scattered x-y-z-data, but here you've got some 3D-matrix, 10 layers deep.
Lilya
Lilya 2018년 10월 9일
thank you so much for the responses.

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2018년 10월 9일
A = rand(251,28,10) ; % some dummy data for demo
[m,n,p] = size(A) ;
% Extract 5th column from each matrix
iwant = zeros(m,1,p) ;
for i = 1:p
iwant(:,:,i) = A(:,5,i) ;
end
iwant = squeeze(iwant) ;
pcolor(iwant) ;
shading interp ;
colorbar
  댓글 수: 1
Lilya
Lilya 2018년 10월 9일
SUPER!! many many Thanks..

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by