Info

此问题已关闭。 请重新打开它进行编辑或回答。

Matlab modle (using curve fit tool) not matching Labquest model.

2 次查看(过去 30 天)
We are analyzing sound pressure data. By recording sound from 1 source in to microphones separated at a distance of x=.25 meters. By modeling you can derive the velocity of sound from the difference of phase angles.
This works well when modeling with the Labquest device. However when using matlab I get different numbers for my phase (c).
I am using the custom equation function. (a*cos(2*pi*500*x+c)+d) The model seems to work well with a good fit but the calculation with matlab leads to a Speed of sound of 441m/s when its really around 341m/s.
Is there somthing i am doing with matlab incorrectly when modeling using the curve fit tool?
To be clear C=phase angle=.19 for mic1 from Labquest and C2=-2.65. Giving a difference of phase=2.44rad/s
However matlab gives
C=0.02785
C2=1.343
c-c2=completely not right.
Velocity equation used: V=(x*Hz*2*pi)/(c2-c1)
x=displacement
I have attached pictures of the models from matlab. Thank you for your help.
  2 个评论
Charles
Charles 2014-6-20
Also why does matlab assign a negative coeffcient to my equation. I type a*cos(b*x+c)+d. In the Results window you see: -a*cos(b*x+c)+d
dpb
dpb 2014-6-20
The two datasets aren't particularly close to each other; not sure why you would think you would get the same fitted results. There is quite a lot more distortion from a pure cosine in the second than the first so I'm not surprised the model doesn't come up with very good estimates for the physical parameters given that disparity. I'd presume if you use the same data in the two packages you'll get similar results.

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by