Borrar filtros
Borrar filtros

How to plot linear least square model for a data?

1 visualización (últimos 30 días)
Harsh Patel
Harsh Patel el 11 de Oct. de 2018
Editada: KSSV el 11 de Oct. de 2018
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 comentario
Kevin Chng
Kevin Chng el 11 de Oct. de 2018
Editada: Kevin Chng el 11 de Oct. de 2018
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by