cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Unexpected nested arrays after using lookup

memorris
1-Newbie

Unexpected nested arrays after using lookup

Hi! I am using the lookup function in MathCAD 14.0. Specifically I have a file containing the results of a FFT performed by the oscilloscope I have connected to an amplifier I am testing and wish to extract and compare the harmonics generated as the amplifier is overloaded.

I can read the file and plot the FFT. I know the frequencies at which I wish to record the signal levels and create an array Fpk with those frequencies in it. This is then used with the two single column arrays (frequency and amplitude(dBm)) into a lookup equation to generate the variable Peaks. I expect Peaks to be another single column array but the lookup returns an array of 1x1 arrays.

What am I missing? Am I do something incorrectly? How do I convert from the array of 1x1 arrays to a single column array?

Any help will be gratefully accepted.

Martin

3 REPLIES 3
MikeArmstrong
5-Regular Member
(To:memorris)

Like below? Use the zero subcript.

Clipboard01.jpg

Mike

Mike,

Thanks for that. Probably easy when you know how!

Many thanks again.

Martin.

MikeArmstrong
5-Regular Member
(To:memorris)

Yes it certainly is.

It's because the Lookup functions return the answer as a Matrix.

Mike

Top Tags