ploting error bars of matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Star Strider
am 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 Kommentare
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!