Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

single dimension array smoothing

Status
Not open for further replies.

danielp0

Bioengineer
Joined
Jul 4, 2005
Messages
7
Location
CA
does anyone know of a quick way that I can smooth a line graph ?

thanks
 
You could low-pass filter it. Matlab has many filter design tools, but a simple moving average is often enough:

b=ones(1,n)/n;
smoothed=filter(b,1,rough);

n is the length of your moving average window.
 
This seems to work fine, thanks. I was looking into using mean, but this is quicker.

the only thing I found is that it shifts the data a bit. but that's not really a problem.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top