How to plot linear least square model for a data?

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by