ploting error bars of matrix
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Star Strider
el 24 de En. de 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 comentarios
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!