How to plot linear least square model for a data?

1 回表示 (過去 30 日間)
Harsh Patel
Harsh Patel 2018 年 10 月 11 日
編集済み: KSSV 2018 年 10 月 11 日
I have a data in form of a table
>> T = {'1';'2';'3';'4';'5';'6';'7';'8';'9';'10'};
>> X = [1;2;3;4;5;6;7;8;9;10];
>> Y = [10;20;30;40;50;60;70;80;90;100];
>> Z = [1.1;2.2;3.3;4.4;5.5;6.6;7.7;8.8;9.9;11.0];
>> A = [2;4;6;8;10;12;14;16;18;20];
>> B = [1;3;5;7;9;11;13;15;17;19];
>> T = table(T,X,Y,Z,A,B)
i am new to matlab and i want to learn how to plot experimental data and use linear least square fitting to finding the relation between A-X,Y,Z and B-X,Y,Z along with equation, intercept, and r2 values. And once i get the model how can i use it to find the best combination of X,Y,Z to achieve highest (B-A) value. Thank you for the help in advance.
  1 件のコメント
Kevin Chng
Kevin Chng 2018 年 10 月 11 日
編集済み: Kevin Chng 2018 年 10 月 11 日
try this first
plot(A,X)
Then you have put effort to learn from here
Hope they help you. Any specific line you have doubt, you may ask in community after you tried your ways.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by