How to combine ezplot and scattered values into one plot?
Show older comments
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
Answers (0)
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!