How to add error bars to a 3D graph
조회 수: 22 (최근 30일)
이전 댓글 표시
There is no default function to put error bars on 3d graphs, so please tell me how to put error bars on 3d graphs.
댓글 수: 0
답변 (1개)
Dyuman Joshi
2023년 10월 19일
You can plot vertical bars on each data point -
x = 0:0.5:10;
y = 2*sin(x);
z = 3*cos(x);
%Define the upper and lower error values
el = abs(z/10)+0.2;
eu = abs(z/5)+0.1;
figure
plot3(x,y,z, 'k-')
hold on
plot3([x;x], [y;y], [z;z]+[-el;eu], '-r')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Errorbars에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!