Predict power consumption using linear regression
显示 更早的评论
I want to predict power consumption per hour with this data using linear regression.
How can i do this?
采纳的回答
更多回答(1 个)
Florian Bidaud
2022-10-28
0 个投票
Hi,
You can use the function polyfit with x being the time and y being the power consumption, you will have to choose n to fit your data as you want. In your data, I guess when the time comes back to 1 it means it's another day ? Then you will need to change 1,2,3,..., 23 to 25,26,27,....47 for the second day and so on
类别
在 帮助中心 和 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!

