Skip to main content
1-Visitor
February 10, 2012
Question

Unexpected nested arrays after using lookup

  • February 10, 2012
  • 3 replies
  • 2108 views

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

1-Visitor
February 10, 2012

Like below? Use the zero subcript.

Clipboard01.jpg

Mike

memorris1-VisitorAuthor
1-Visitor
February 10, 2012

Mike,

Thanks for that. Probably easy when you know how!

Many thanks again.

Martin.

1-Visitor
February 10, 2012

Yes it certainly is.

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

Mike