How can draw a linear regression though a plot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Joseph
am 27 Mär. 2018
Kommentiert: Joseph
am 28 Mär. 2018
Hi everyone I have to arrays f(32,302) and C(32,302) in which some of the elements of f and C are nan. i want to plot (plot(f,C)) and include linear regression (i tried polyfit(x,y,1)) but the problem is that because of nan values it returns y=nanX+nan. does anyone know how can I solve this problem?
thankyou
thank you
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 27 Mär. 2018
"regress treats NaN values in X or y as missing values. regress omits observations with missing values from the regression fit."
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!