ploting error bars of matrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i have a matrix A of 300*2 first colum is a time stamp and secornd colum is measurement. I have calculated the error of associated with measurement and named it error_data how can i plot the graph of matrix A with errorbars i.e the error_data. I am a rookie in matlab at the moment
0 commentaires
Réponses (1)
Star Strider
le 24 Jan 2016
Here is one approach:
M = [1:20; rand(1,20)]';
fun = @(M) [M(:,1) M(:,2) M(:,2)*sqrt(5E-11)];
R = fun(M);
figure(1)
errorbar(R(:,1), R(:,2), R(:,3)) % ‘Regular’ Error Bar Plot
grid
figure(2)
plot(R(:,1), R(:,2), '-b') % Plot Blue Line Data
hold on
errorbar(R(:,1), R(:,2), R(:,3), '.r') % Plot Red Error Bars
hold off
grid
0 commentaires
Voir également
Catégories
En savoir plus sur Annotations 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!