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에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!