T O P I C R E V I E W |
Nilsdalby |
Posted - 03/16/2010 : 3:11:59 PM Hi
Im using originpro 8.0 SR6 on a windows xp platform.
A seemingly minor problem: How can i loop over all columns in a sheet and perform a fft on each column, using the x-function fft1 ? Note, the X-function fftonmultiplecolumns is named in the help but not yet defined.
Ive tried variations over A-C:
A) loop(j,2,ncols){fft1 ix=(j);}; B) for(ii=2;ii<ncols; ii++){fft1 ix=col(ii);}; C) for(ii=2;ii<4;ii++){fft1 ix=($(ii));};
I further want the result (power) to go to one sheet and to write specifications as to how the fft is performed (graphs, phase, unwrap etc.) which should count for all columns.
Suggestions are welcome, thanks
|
4 L A T E S T R E P L I E S (Newest First) |
nguyenphucuong280193 |
Posted - 12/26/2014 : 10:07:26 PM Hi Nilsdalby,
I have a very similar problem, however with an x-function requiring 2 input arguments. What's the right syntax here:
loop(ii,2,15){ differentiate iy:=(1,ii) oy:=(17,ii+16); } is obviously wrong, but how to do it right?
|
schneide |
Posted - 12/11/2014 : 04:45:09 AM Seems like I found out myself, thanks to the solution to above posting
Here it is:
loop(ii,2,15){ differentiate iy:=(1,$(ii)) oy:=(17,$(ii+16)) ; }
I thought I had tried this before and it didn't work. Obviously I had made a different error at the time
Giselher |
schneide |
Posted - 12/11/2014 : 04:32:12 AM Hi,
I have a very similar problem, however with an x-function requiring 2 input arguments. What's the right syntax here:
loop(ii,2,15){ differentiate iy:=(1,ii) oy:=(17,ii+16); } is obviously wrong, but how to do it right?
Giselher
Giselher |
greg |
Posted - 03/16/2010 : 4:05:54 PM There are syntax errors in each of your looping examples which are corrected here: // ncols is a property of wks // don't forget to use ':=' and not just '=' // col( ) function cannot be used with variables loop(j,2,wks.ncols) {fft1 ix:=$(j);}; for(ii=2;ii<wks.ncols; ii++){fft1 ix:=wcol(ii);}; for(ii=2;ii<4;ii++){fft1 ix:=($(ii));};
For examples of what to do within the loop, see http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Signal_Processing#Compute_Basic_Statistics_on_FFT_Result |
|
|