 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[mathcad] RE: Sinus regression using genfit
| [mathcad] RE: Sinus regression using genfit |
|
Author: Oakley, Philip SELEX UK
Posted: Thu, 16 Feb 2006 10:09:02 +0000
|
Not looked at the attachement but...
The function looks to be effectively the result of an fourier transform, plot the maginitude and phase, taking the DC component as a3, then read of the peak frequency (~a2), the amplitude of the peak (a0) and the phase of the peak (a1.a2~2pi).
You would use the cfft/CFFT rather than fft/FFT because they cope with data lengths not 2^n. (but not irregular sampling!!)
Specifically use CFFT because this give the amplitide of a spot frequency, rather than energy density (which would apparently change the value for a spot frequency amplitude when providing a different number of samples - note the root(n) in its definition - see the help file.)
Because your data is regularly sampled (x spacing of 2) you can either use the y data directly and allow for the 2 factor yourself, or
More effectively, use zero stuffing. Because fourier analysis is additive [principle of superposition] you can add as many zeros as you like to the data.
so determine the max x value, find next 2^n, then fill in thge values you have at the right place, then do the FFT, plaoit magnitude and phase, read of values needed ( allow for 2pi radians/cycle and all that, and the first frequency on the plot is at one cycle per 2^n.
If you need finer resolution, add an extra power of 2 to 2^n. The zero stuffing theorem handles everything.
[OK so I have looked at the attachement now]
Philip
From: Torgrim Sandvoll "mailto:torgrim"
Sent: 15 February 2006 17:14
To: Mathcad Discussion List
Subject: [mathcad] Sinus regression using genfit
*** WARNING ***
This mail has originated outside your organization,
either from an external partner or the Global Internet.
Keep this in mind if you answer this message.
Hi,
Trying to fit data to the general (sinusoidal) function:
f(x,a):a0*sin(a1*(x+a2))+a3
(The periodic data for regression is often used in Norwegian highschool
math)
(See attached Mathcad (v11+) document)
Have tried with genfit, but this method seems very sensitive to the guess
values given.
Any better way to solve this problem would be appreciated!
Have a nice day! :-)
Best regards,
Torgrim Sandvoll
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
|
[View Complete Thread]
Previous by date: [mathcad] RE: Sinus regression using genfit, Pergande, Albert N
Next by date: [mathcad] RE: Sinus regression using genfit, Potter, Mick
Previous thread: [mathcad] Sinus regression using genfit, Torgrim Sandvoll
Next thread: [mathcad] Re: Sinus regression using genfit, William J Marshall
|
|
|