![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/766011/image.png)
How to implement regressionGP class in Simulink
1 次查看(过去 30 天)
显示 更早的评论
Hello All,
I am trying to use a Gaussian process regression model in Simulink. My setup is very basic, yet I cannot get it to work. The function block simply loads the model, then predicts the output given the new observations. When running the contents of the function outside of Simulink it runs with no errors, but when I run from within Simulink, there are multiple errors from within the 'predict' methods.
I've attached the .m file and .slx file, if anyone has any advice that would be great.
Mathworks has an example on executing classification models within Simulink, but I don't see anything on GPR models.
Thanks
0 个评论
回答(1 个)
Salman Ahmed
2021-10-13
编辑:Salman Ahmed
2021-10-13
Hi Holden,
From my understanding, you would like to replicate the functionality of your MATLAB file in Simulink. The functionality is replicated correctly. The error you are getting in Simulink is due to incorrect signal specification. Add a signal specification block with the size of the inputs specified in dimensions [1 11] (as shown), your errors will resolve.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/766011/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/766011/image.png)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!