getting an equation from multiple variables
Mostrar comentarios más antiguos
I need to get the equation of a multiple variables. I have the data a matrix of 5 coulomns; one coloumn for the output and the others for the variables.
Did anyone use a function to get the equation parameters?
9 comentarios
Bob Thompson
el 2 de Feb. de 2021
I don't understand what you're asking for. Are you wanting to try and figure out the function based on the inputs and output? Or are you wanting to generate the output for a known equation using the four inputs?
Essam Ali
el 2 de Feb. de 2021
James Tursa
el 2 de Feb. de 2021
Are you trying to fit a curve to some data? E.g., linear regression?
Essam Ali
el 3 de Feb. de 2021
Bob Thompson
el 3 de Feb. de 2021
Something like:
out = 5*(variables(:,1))+3*(variables(:,2))+variables(:,3)-3*(variables(:,4));
Essam Ali
el 3 de Feb. de 2021
James Tursa
el 3 de Feb. de 2021
There is no magic method for determining a formula from arbitrary data. Typically you would have some idea about what the data represents and get a formula from that. Then plotting and trying various fits to see how well it matches expectations for residuals, etc.
Essam Ali
el 3 de Feb. de 2021
Walter Roberson
el 3 de Feb. de 2021
file exchange has polyfitn
Respuestas (1)
madhan ravi
el 2 de Feb. de 2021
Editada: madhan ravi
el 2 de Feb. de 2021
MAtrix = [3, 6, 1, 3, 8; 3, 6, 1, 3, 9];
syms x y z w Out
Out * MAtrix(:, 1) == (MAtrix(:, 2 : end) * [x, y, z, w].') % something like this?
1 comentario
Essam Ali
el 3 de Feb. de 2021
Categorías
Más información sobre Spline Postprocessing 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!