LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

General linear fit with 2d arrays: is it possible?

Some days ago I learned, thanks to altenbach's VIs, how to perform a polinomyal fit Z=f(X,Y), where X,Y,Z are vectors. Now I ask if it is possible to perform a polynomial fit of such type: (Z1,Z2)=f(X,Y), where now I have 2 vectors Z1 and Z2.
I haven't found any documentation about it. I don't know how to build the H Matrix, and I don't know what to send to the y input of the general fit VI. To be true, I don't even know if it is possible, but I hope it is. All the 4 vectors Z1,Z2, X1,X2 have the same dimension.
Could you help me? Thank you
0 Kudos
Message 1 of 5
(3,673 Views)

LabVIEW is a full featured programming language, so anything is possible.

 

You need to explain in more details how your data looks like. What is x and y? How do Z1 and Z2 depend on the paramters and x and y? You want to simultaneously fit to two surfaces? What is the model?

0 Kudos
Message 2 of 5
(3,658 Views)
Thank you. I have just found this article http://it.mathworks.com/help/stats/multivariate-general-linear-model.html , that explains the model and how to implement it. Tomorrow I am going to try. As far as I can understand, they suggest the method of interleaved arrays.
The Z1 vector is a vector of data that I succesfully fitted with X and Y some days ago. The Z2 vector is another set of data that I didn't use in the analysis so far. What I realy need is the fit that I did last week. I am curious to see if something change if I use the Z2 set of data to perform a simultaneous fit. I am not sure, because the number of parameters increases.
0 Kudos
Message 3 of 5
(3,643 Views)

I tried the bivariate general fit, as described in the above link and the result is exactly the same as in the single fit. I read somewhere in the web that this is correct (that is nothings changes as respect to the single fit). Nevertheless, I am quite surprised and disappointed because of that. Anyway, if someone wants to play with general fits with 2 vectors, here there is the png to modify the H matrix. The vectors to be sent to the fit have to be interleaved and eventually decimated. 

0 Kudos
Message 4 of 5
(3,596 Views)

You are not adding any new or useful information. Can you show us the rest of the code?

0 Kudos
Message 5 of 5
(3,587 Views)