 |
|
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: Andy Spragg
Posted: Thu, 16 Feb 2006 12:12:26 +0000
|
Google("zero stuffing theorem") = {} i.e. the empty set. Do tell! Andy
"Oakley, Philip (SELEX) (UK)" "philip.oakley"
16/02/2006 10:09
Please respond to
"mathcad"
To
Mathcad Discussion List "mathcad"
cc
Subject
[mathcad] RE: Sinus regression using genfit
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.
********************************************************************
****************************************************************
Any opinions expressed in this email are those of the individual and not necessarily of RHM plc and/or any of its subsidiaries.
This email and any files transmitted with it are private, may be confidential and are for the intended recipient only. If you are not the intended recipient, be advised that you have received them in error. Please notify the sender of the error, delete all copies of them from your system and destroy any printed copies.
If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this email and any files transmitted with it.
Please rely on your own anti-virus system. No responsibility is taken by RHM plc and/or any of its subsidiaries for any damage arising out of any bug or virus infection.
****************************************************************
|
[View Complete Thread]
Previous by date: [mathcad] (no subject), JSWAVELY
Next by date: [mathcad] Try and get MathCad to Linux, Michael Inggs
Previous thread: [mathcad] FW: Sinus regression using genfit, Bury, Scott SJ
Next thread: [mathcad] Try and get MathCad to Linux, Michael Inggs
|
|
|