ploting error bars of matrix
이전 댓글 표시
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
답변 (1개)
Star Strider
2016년 1월 24일
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
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!