how to fit a trend line in plotyy ?
显示 更早的评论
% code
y = [1:120]';
plotyy(y,data1,y,data2);
hold on
% plot(y,intercept + slope*y);
according to this code how can fit a trend line in data2
采纳的回答
更多回答(1 个)
Image Analyst
2015-3-2
0 个投票
See my attached polyfit demo.

类别
在 帮助中心 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!