How to plot linear least square model for a data?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Kevin Chng
le 11 Oct 2018
Modifié(e) : Kevin Chng
le 11 Oct 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.
Réponses (0)
Voir également
Catégories
En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!