How can I plot an X(as time) and a Y, and then another Y(with fewer points) as a colormap on the XY plot
조회 수: 1 (최근 30일)
이전 댓글 표시
How can I plot Time on the x axis, and a y, with a second y ( fewer elements) as a colormap on the line created between the XY plot.
댓글 수: 0
답변 (1개)
KSSV
2017년 6월 7일
%%your fewer points
data = rand(10,3) ;
x = data(:,1) ; y = data(:,2) ; z = data(:,3) ;
x0 = min(x) ; x1 = max(x) ;
y0 = min(y) ; y1 = max(y) ;
N = 50 ;
xi = linspace(x0,x1,N) ;
yi = linspace(y0,y1,N) ;
[Xi,Yi] = meshgrid(xi,yi) ;
Zi = griddata(x,y,z,Xi,Yi) ;
surf(Xi,Yi,Zi) ;
colorbar
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Colormaps에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!