Plotting multiple linear models on one plot
显示 更早的评论
Hi all,
I have a dataset and I am fitting multiple linear models to it. The first model is fit to the first 1/3 section of the data, the second model is fit to the first 2/3 section of the data, the third model is fit to the last 2/3 section of the data, the fourth model is fit to the last 2/3 section of the data and the last model is fit to all data.
I am using the fitlm fucntion to generate these linear models and the numbers of the mdl=fitlm() function match what I am seeing in excel (error <1%). However, when I try to visualize all the data on one plot I am getting all the linear models in red. So it is very hard to differentiate between one model or the other. Any idea how to change the color of each linear plot?
Thanks,
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 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!
