How to combine ezplot and scattered values into one plot?

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

질문:

2017년 6월 30일

댓글:

2017년 7월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by