How to add error bars to a 3D graph

25 visualizaciones (últimos 30 días)
優太
優太 el 19 de Oct. de 2023
Respondida: Dyuman Joshi el 19 de Oct. de 2023
There is no default function to put error bars on 3d graphs, so please tell me how to put error bars on 3d graphs.

Respuestas (1)

Dyuman Joshi
Dyuman Joshi el 19 de Oct. de 2023
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')

Categorías

Más información sobre Errorbars en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by