Jump to content

interpolating & arrays


jarima

Recommended Posts

I have an two arrays: For instance one with values for frequency the other with voltages, I want to compare a certain frequency and its voltage to another frequency and its voltage? Say 500 Hz has 20v and 1000Hz has 10v, I want to compare those two points and came up with a string that will display something like good data or bad data ?How can I do that, been searching for a week cant find it. Another is how can I interpolate for example to find the frequency which has a value of 7v and then display it. Please Help

Link to comment

As to the first part of your question, I am not sure I understand exactly what you want to do.

But I can help with the interpolation part:

There are two ways to do this. You can doing by using your two arrays. Then you have to interpolate twice. First you find the fractional index that 7V would have in your voltage array. Then you find the value that corresponds to this fractional index in the frequency array.

If you combine the two arrays to an array of points, then you can simply use one interpolation function. Everything else is done for you. Make sure two wire the Voltage array to the first input.

In both cases the voltage array has to be in ascending order and the values in the frequency array have to be at the same positions as the corresponding voltage values.

post-1022-1100528790.jpg?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.