3D colored line plot

버전 1.4.0.0 (1.47 KB) 작성자: Georg Stillfried
Plot 3D lines with CData, (actually surface)
다운로드 수: 4.1K
업데이트 날짜: 2009/10/22

라이선스 보기

plots a 3-D "line" with c-data as color
Makes a surface object and the colouring is controlled by the colormap.

Example:
v_start = [2 1 8]; % m/s
g = 9.81; % m/(s^2)
t_impact = 2*v_start(3)/g; % s
t = [0:t_impact/100:t_impact]'; % s
x = v_start(1)*t; % m
y = v_start(2)*t; % m
z = v_start(3)*t-1/2*g*t.^2; % m
velocity = ([[x(2:numel(t)) y(2:numel(t)) z(2:numel(t))]-[x(1:numel(t)-1) y(1:numel(t)-1) z(1:numel(t)-1)];[0 0 0]]); % m/s
speed = sqrt(sum(velocity.^2,2)); % m/s
color_line3(x,y,z,speed);
axis equal vis3d; view(15,15);
title('trajectory of a projectile, color = speed');
axis equal vis3d; view(15,15);
colorbar

인용 양식

Georg Stillfried (2024). 3D colored line plot (https://www.mathworks.com/matlabcentral/fileexchange/23566-3d-colored-line-plot), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14SP3
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.4.0.0

removed "scatter" from title

1.2.0.0

add filename to title

1.1.0.0

Added example

1.0.0.0