Finding a linear equation
2 ビュー (過去 30 日間)
古いコメントを表示
TRAILOKYA
2019 年 11 月 5 日
編集済み: JESUS DAVID ARIZA ROYETH
2019 年 11 月 5 日
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 件のコメント
採用された回答
JESUS DAVID ARIZA ROYETH
2019 年 11 月 5 日
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 件のコメント
JESUS DAVID ARIZA ROYETH
2019 年 11 月 5 日
編集済み: JESUS DAVID ARIZA ROYETH
2019 年 11 月 5 日
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
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Digital Filter Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!