Find the function between variables
Mostrar comentarios más antiguos
Hi everyone,
Got a question. I have 4 data, W, G, V1, V2, and let say W changes from 0 to 0.5 and G has got it own values, the same case for V1 and V2. By the way, I got these values from measurment. I want to find out the relationship between V1, W and G and also the relationship between V2, W and G, I mean
V1=F(W,G)
V2=F(W,G)
I want to find this F. Does MATLAB can do it for me by just giving the data?
Sorry if that sounds silly! I will appreciate your help.
Respuestas (2)
Oleg Komarov
el 28 de Jun. de 2011
doc polyfit
I addition to Walter's comments you may want to plot the data to see if the data follows some known relationship (e.g. linear, quadratic etc...).
2 comentarios
Walter Roberson
el 28 de Jun. de 2011
Note: polyfit() is only suitable for single variables, not for multivariate.
Oleg Komarov
el 28 de Jun. de 2011
Right, thus I agree with your last comment.
Walter Roberson
el 28 de Jun. de 2011
0 votos
If you have a finite set of data, there are a (literally) infinite number of different functions that exactly match the data. I would say that "there are even more functions if the data is considered to have noise", but of course there isn't any number that is "more" than infinity ;-)
So... in order to find a useful relationship between the values, you need to start with a model of what the relationship could be. If you have a model, you can use the data to calculate the parameters for the model that would best fit the data; if you do not have a model to start with, you have no way of knowing whether any particular relationship is "good" or not.
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!