SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Sth about FFT Spectrum (Mag and Phase)

Hello,

In response to your questions:

1) You are correct.  In MathScript, index 1 corresponds to the first element in an array.  In LabVIEW, index 0 corresponds to the first element in an array.

2) The "missing assignment to tunnel" error indicates that you are using a case structure and you have provided an output from one of the cases.  However, the other cases do not have an output provided.  If you supply an output in the other case, this error will go away.

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
0 Kudos
Message 11 of 13
(3,633 Views)

Hi,

Thanks for your reply.

1. In my vi, there is only one case structure, so I do not understand what you mean the outputs in other case structures.

2. Another problem is when I just give a number to the maxindex and I run the program, the errors says that the indexes are out of bound for variables I specified on line 5.  On line 5, I just wanna to read the data of angleP every time then to form a matrix in the end. Now what I am not clear about is if the length of the angleP is 2048 the same as the length of the array which is the input of FFT. If it is, I do not know why there is error.

Thanks.

 

Huihui

0 Kudos
Message 12 of 13
(3,612 Views)
Hello Huihui,

Yes, there is only one case structure.  I was referring to outputs in other cases of the single case structure.  Think of a case structure like an if-else statement in C.  You currently have code for the if case, but you do not have code for the else case.  If you don't need code in the other case, then you can remove the case structure.  Likely, all you need to do is write the code for when Autocorrelation is false.

Without having actual data and being able to run your VI, I'm not sure of exactly what is causing the error on line 5.  My guess is that j (aka maxindex) is too large for the matrix.  You have
AngleP(m, j) = AngleP(m, j) -...
The left-hand side is okay.  The matrix will grow if j is too large.  However, the right-hand side will throw the error you are seeing if j is too large.  You will just want to ensure that j is less than or equal to the number of columns in the AngleP matrix.

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
0 Kudos
Message 13 of 13
(3,488 Views)