Origin Version (Select Help-->About Origin):Origin pro 7.5 sr5
Operating System:xp
i used two methods to give on the same Dataset lowpass frequency cutoff.
one is using the menu of origin,the other is fft_lowpass(),and the Fc was the same .
but the results are different.So is bandpass.
sorry for my poor english.
i cannot figure out what happened.
here is my oc code
int run_fft_lowpass(double dFc)
{
Worksheet wks = Project.ActiveLayer();
if( !wks )
{
out_str("A worksheet must be active.");
return 1;
}
int iErr;
for(int i=1;i<wks.GetNumCols();i++)
{
if(wks.Columns(i).GetType()==OKDATAOBJ_DESIGNATION_Y)
{
Curve crv(wks,i);
iErr = fft_lowpass(crv, dFc);
if(iErr<0) break;
}
}
switch(iErr)
{
case -3:
out_str("Invalid cutoff frequency.");
break;
case -2:
out_str("Invalid curve.");
break;
case -1:
out_str("Curve does not meet time resolution criterion.");
default:
break;
}
return iErr;
}