LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining equations with 3D graph

Sorry, I did not have time to look into this further, maybe tonight...

OK, to predict truly random positions, we need to interpolate in both dimensions (WW vs. reflectivities AND WW vs. WV). Should both be polynomial?

Maybe you can do something similar to my very old example from summer 2002? Just replace the spline with polynomial interpolation.
Message 21 of 40
(2,737 Views)
Post Collision detected!

See Christian's post.

Ok I thought we were done with the math!

WARNING:

The last time I posted something math related CC threatened to give me a minus five stars for trying to take the log of a negative #!

The example I posted shows you how your data compares with a surface defined be the equations Christian devloped.

Your data set is incomplete over the entire range so I suggest the following outline to proceed.

1) Find the Min and Max of Y values for each of your sub-sets.

2) Find the smallest of the Maximums and the largest of the Minimums. These will establish the range you will use for re-sampling.

3) Use Christians equations to re-sample your data so that you have the same Y-values in each data set.

4) Using your specified %value and locate the two re-sampled seq (from step 3).

5) Interpolate between each pairs z-values using the specified % value.

6) Run the new sequnce of measurements obtained for #5 through Christian's algorithm.

Summarized.
A) Resample all
B) Choose bounding re-sampled data sets.
C) Interpolate at specified %.
D) Fit new data.

There is probably a better way of doing this ut that is all that comes to mind at the moment.

Ben

Message Edited by Ben on 06-13-2005 11:32 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 22 of 40
(2,736 Views)
Christian's post? Could you give me the link?

This is how the prediction would work...

Basically you have bunch 2D polynomial curves (WR-> X, WW- > Y) plotted along the z axis (reflectivity). So when you enter a reflectivity value (30%) you're basically going to "30" at z value, fit a polynomial curve along X and Y and find out the polynomial constants. Does this make sense?

I thought of a way to do this but it might not be the most efficient... basically you fit a polynomial along either X Z and Y Z direction, find out the constants. Then when user selects a z value you use these constants to find out the values at the specific points. Insert these points into an array and then plot the data. The problem with this method IMO, is that it might take a bit of time since we're talking about 200-300 data points.

Thanx for the helps so far. I'll take a look at the links you guys posted.
0 Kudos
Message 23 of 40
(2,728 Views)
Ok an update.

It appears that the method I mentioned isn't desired. It is desired to find out the polynomial constants of the surface. ie. Z = a + bx + cy + dx^2 + ey^2 + ....

It seems that I can (or get someone to) write a program in Labview to do this. So my question is... is it possible to get Labivew collect all the data, save them in a text file, then calls a MatLab program to analyze the data?
0 Kudos
Message 24 of 40
(2,733 Views)

@Honeywell wrote:
... then calls a MatLab program to analyze the data?

Even this has been done in LabVIEW too, no need to downgrade to matlab. 😉

have a look at my 2D polynomial fit example. It simulates and fits a 2D plane. This simplified example assumes a regular xy-grid of known size and boundaries. (There is even a LabVIEW 6.1 version posted further down in that thread! You should be able to use that in LabVIEW 6.1). In order to get your 3D data in, you would need to do some modifications as outlined e.g. in my later post (Please look at the entire thread). Another related post.

This should be quite easy. Let me know if you have questions. I can make 6.1 versions from anything if needed. 🙂
Message 25 of 40
(2,715 Views)
Ok I'll try to trace through that program.

After discussing with couple ppl it seemed that I had the wrong idea about what this program should do (oops).

So to clearify...

Basically the program takes in the collected data (either a txt file or arrays, probably easier with a txt file?), then the user can specify the range of values he/she wants (ie row 2-row 100, refer to the excel file I posted earlier). The program then plots the 3D surface (which is easy), and then gives a 2D polynomial equation for this 3D surface.

Z = a + bx + cy + dx^2 + ey^2 + ...

Where the user can select how many order he/she wants. (Probably to a max of 6).
0 Kudos
Message 26 of 40
(2,706 Views)

@Honeywell wrote:
Z = a + bx + cy + dx^2 + ey^2 + ... Where the user can select how many order he/she wants. (Probably to a max of 6).


What about cross terms that mix x and y? Do you need those?

Z = a + bx + cy + dx^2 + ey^2 + fxy + gx^3 + hy^3 + ix^2y + jxy^2 + k ...
Message 27 of 40
(2,702 Views)
"
What about cross terms that mix x and y?
"
And on that note Ben tucks his tail between his legs and sneaks off into the shadows....

Go getem Christian!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 28 of 40
(2,697 Views)
Totally forgot about the cross terms.

Nope don't need to find out about them. Only interested in the single terms.

so 2nd order would be
z= a + bx + cy + dx^2 +ey ^2

3rd order

z= a + bx + cy + dx^2 +ey ^2 + f x^3 + g y^3

etc...

Message Edited by Honeywell on 06-13-2005 03:08 PM

0 Kudos
Message 29 of 40
(2,694 Views)
Still having a hard time coming up with a VI that gives me 2D polynomial equation. 😞
0 Kudos
Message 30 of 40
(2,668 Views)