How can i get standard deviation in a scatter3 plot
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
figure
scatter3(SL0,SR0,V0,15)
hold on
scatter3(SL20,SR20,V20,15)
scatter3(SL30,SR30,V30,15)
plot3(L2,L1,L3,'b')
plot3(LL2,LL1,LL3,'r')
plot3(LLL2,LLL1,LLL3,'k')
hold off
grid on
This is my current code which gives me

I would like to get a standard deviation in both x,y,z direction for each of the data points (the 9 dots). I think it's rather advanced, so is it even possible?
Réponses (1)
Star Strider
le 8 Mai 2019
It would be easiest to concatenate your scalar variables into a matrix, then take the standard deviation of the matrix rows:
Smtx = [SL0, SL20, SL30; SR0, SR20, SR30; V0, V20, V30];
Ssd = std(Smtx,[],2)
Here, Ssd(1) is the standard deviation of the x-values, Ssd(2) y-values, and Ssd(3) z-values.
If you only have the three sets of scalar values, this will work. If you have more data, or if your data are different, you need to change the code accordingly.
0 commentaires
Voir également
Catégories
En savoir plus sur Line Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!