getting an equation from multiple variables

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

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
Essam Ali 2021년 2월 2일
I want to get the equation as y=5x+3y+z-3W something like that.
Are you trying to fit a curve to some data? E.g., linear regression?
Essam Ali
Essam Ali 2021년 2월 3일
not curve but an output of experimental results from variables.
Something like:
out = 5*(variables(:,1))+3*(variables(:,2))+variables(:,3)-3*(variables(:,4));
Essam Ali
Essam Ali 2021년 2월 3일
No. IF I have two variables affecting third one. as example power=Voltage*current.If I have a matrix of Third coloumns for different readings of power, voltage and current but I don't know the equation(power=Voltage*current), how can I get the unknown equation?
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
Essam Ali 2021년 2월 3일
Polyfit function does this but in one variable
file exchange has polyfitn

댓글을 달려면 로그인하십시오.

답변 (1개)

madhan ravi
madhan ravi 2021년 2월 2일
편집: madhan ravi 2021년 2월 2일
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?
ans = 

카테고리

도움말 센터File Exchange에서 Spline Postprocessing에 대해 자세히 알아보기

태그

질문:

2021년 2월 2일

댓글:

2021년 2월 3일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by