필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 2 (최근 30일)
Charles
Charles 2014년 6월 19일
마감: MATLAB Answer Bot 2021년 8월 20일
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