Vous êtes sur la page 1sur 3

Integration via cumsum - Newsreader - MATLAB Central

Search: MATLAB Central MATLAB Central Create Account

Go
Log In

File Exchange

Answers

Newsgroup

Link Exchange

Blogs

Trendy

Cody

Contest

MathWorks.com

About the MATLAB Newsgroup Post A New Message

MATLAB Central > MATLAB Newsreader > Integration via cumsum Add thread to My Watch List What is a Watch List?

E-mail this page

Thread Subject: Integration via cumsum


Subject: Integration via cumsum From: J A Llewellyn Date: 30 Aug, 2001 16:20:35 Message: 1 of 3 Reply to this message Add author to My Watch List View original format Flag as spam

Tags for this Thread


Add a New Tag:
Add
Separated by commas Ex.: root locus, bode

What are tags?


I have multiple sets of about 32000 points each in an acceleration data set (with close time spacing), so I proposed, for each one, to calculate the integral to get velocity and do a second integration to get displacement. I looked up some old code from an earlier project, and it looks like this ydot=cumsum(y)*delt; ydot=ydot-mean(ydot); ydis=cumsum(ydot)*delt; ydis=ydis-mean(ydis); I know it's a crude integration but what I can't remember for the life of me is why did I do the mean correction? While I'm at it, if there's a fast trap. or other improvement I'd like to know about it. It must be fast. Subject: Integration via cumsum From: Boyko Stoimenov Date: 31 Aug, 2001 20:54:58 Message: 2 of 3 Reply to this message Add author to My Watch List View original format Flag as spam A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest. Anyone can tag a thread. Tags are public and visible to everyone.

http://www.mathworks.com/matlabcentral/newsreader/view_thread/27105[22/08/2013 09:36:24]

Integration via cumsum - Newsreader - MATLAB Central


Hi J A Llewellyn, > I know it's a crude integration but what I can't > remember for the life of me is why did I do the mean > correction? It's a good idea to comment your own code isn't it? You did the mean correction, because Velocity = Integral (acceleration) + Constant The Constant is your initial velocity V0. You don't know it, but what you know is that your velocity fluctuates around the zero, otherwise your structure will not be vibrating, it will be moving. That's why removing the mean has the effect of adjusting for your unknown initial conditions. If the data is to be used for frequency analysis, consider better to use Simpson's rule. It has a better frequency response (flat up to 0.2*Sampling frequency). Simpson's rule integration is performed with this: b = [1 4 1]/3; a = [1 0 -1]; z = filter(b,a,y)*delta; Hope this hepls. Boyko -On the USENET they seldom misquote you. In fact, they usually repeat word for word what you shouldn't have said. ------------------------------------------------------------------------------------------------------Subject: Integration via cumsum From: J A Llewellyn Date: 31 Aug, 2001 11:22:52 Message: 3 of 3 Reply to this message Add author to My Watch List View original format Flag as spam

Thanks Boyko, I couldn't tolerate simpson's before but I'll try it again. Tony

Feed for this Thread

http://www.mathworks.com/matlabcentral/newsreader/view_thread/27105[22/08/2013 09:36:24]

Integration via cumsum - Newsreader - MATLAB Central


Contact us

1994-2013 The MathWorks, Inc. Featured MathWorks.com Topics: Site Help Patents Trademarks Support Privacy Policy Preventing Piracy Webinars Terms of Use Newsletters MATLAB Trials Careers

New Products

Documentation

Training

http://www.mathworks.com/matlabcentral/newsreader/view_thread/27105[22/08/2013 09:36:24]

Vous aimerez peut-être aussi