Finding a linear equation
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
TRAILOKYA
am 5 Nov. 2019
Bearbeitet: JESUS DAVID ARIZA ROYETH
am 5 Nov. 2019
I have three variable like x,y, z. I need to find a linear relation between them like z=c1*x+c2*y+c3. Please help. Thanks
0 Kommentare
Akzeptierte Antwort
JESUS DAVID ARIZA ROYETH
am 5 Nov. 2019
solution example:
x=rand(1,20);
y=rand(1,20);
z=3*x+4*y+7;
b=regress(z',[x' y' ones(size(x'))]);
fprintf('Equation is z=%0.2fx+%0.2fy+%0.2f\n',b)
2 Kommentare
JESUS DAVID ARIZA ROYETH
am 5 Nov. 2019
Bearbeitet: JESUS DAVID ARIZA ROYETH
am 5 Nov. 2019
because it is an example you can put anything in z and the program will look for the coefficients for you, x, y, z is your dataset
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Digital Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!