Double integrate a precise series of numbers
이전 댓글 표시
Hi All, I'm very new in Matlab and I would like to ask about this situation. I'm getting some data from my accelerometer, and I directly putting them in a file using this format:
X: 125, x: 103, Y: 127, y: 106, Z: 051, z: 043
X: 120, x: 100, Y: 129, y: 108, Z: 054, z: 045
X: 123, x: 103, Y: 127, y: 106, Z: 053, z: 044
....
X: 111, x: 093, Y: 135, y: 113, Z: 053, z: 044
I want to double integrate for example just the X axis, I know that I can use "integral2" to do that, but it needs a defined function as parameter. in my case is a set of numbers.
Note that the time is t = 1.5s, and the number of lines (readings from the accelerometer) is 78.
how can double integrate it using only this set of numbers?
Thanks in advance.
댓글 수: 18
Star Strider
2014년 6월 2일
Please explain: X, x, Y, y, Z, z. It’s not obvious what your data are and which ones you want to integrate.
Med
2014년 6월 2일
José-Luis
2014년 6월 2일
You haven't really answered Star's question...
Med
2014년 6월 3일
José-Luis
2014년 6월 3일
Maybe I am being dense, but it still is not clear to me. X is what? Position? Time? Moles? Apples? Oranges?
x? Position? Time? Number of remaining orang-utans?
Nowhere in your data do you show time.
Med
2014년 6월 3일
José-Luis
2014년 6월 3일
And what is x?
Med
2014년 6월 3일
The double of integral of a function of a single variable makes no sense.
You can integrate f(x). A double integral of f(x) does not exist.
The double integral of f(x,y) can be found.
You only give us f(x) (if even that).
Once you have defined what you actually want, please look at
integral2() for numerical integration.
int() for symbolic integration.
Med
2014년 6월 3일
José-Luis
2014년 6월 3일
You cannot get a double integral from what you show.
Med
2014년 6월 3일
Med
2014년 6월 3일
Med
2014년 6월 4일
José-Luis
2014년 6월 4일
I don't know because I don't understand what you want. But if you want to obtain position and distance from the acceleration, it looks like A. Jenkins does what you want.
In that case you are not performing a double integral, you are integrating two times. That is not the same thing.
The only caveat would then be that you would need to assume a position and a speed at time t=0, if you don't know them.
Please accept A. Jenkins' answer if it helped you.
Med
2014년 6월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
