How do I plot selected data intervals using ERRORBAR in MATLAB 7.5 (R2007b)?

I would like to plot data on an interval using ERRORBAR in MATLAB 7.5 (R2007b). For example, I have around 360 points of error but when plotted the plot is very busy and does not illustrate the data very well. I would like to remove a defined interval of that data to make the plot look less crowded.

 Respuesta aceptada

You can plot intervals in the ERRORBAR function by specifying the indices in the ERRORBAR function. Then you can specify the interval through the error data you would like to plot over the signal. Below is an example of how one would plot random noise in a Sinusoidal signal.
t=linspace(0,1,360);
sig=sin(2*pi*t);
err=randn(1,360);
l=1:5:360; %Indices in interval
err_sam=err(l);
sig_sam=sig(l);
%Plot the Error in the Signal
errorbar(l,sig_sam,err_sam);

Más respuestas (0)

Categorías

Productos

Versión

R2007b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by