How to combine ezplot and scattered values into one plot?
Ältere Kommentare anzeigen
Hi
I am trying to make a manual linear regression line to fit my measured values. The measured values are plotted with the scatter function and my linear regression line is a symbolic equation. I want my regression line to be plotted together with my measured values. My code:
[k,m,sig] = linearRegression(RSSImean, GPSDistance, valLength)
syms x
figure(1)
for a = 1:(valLength)
scatter(DistanceLog(a), RSSImean(a), 40, 'filled');
hold on
end
hold on
ezplot(k*'x' + m,[DistanceLog(1),DistanceLog(valLength)])
Anyone who knows what I am doing wrong and how it can be solved?
Best regards
1 Kommentar
Tompak
am 3 Jul. 2017
Antworten (0)
Kategorien
Mehr zu Scatter Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!