Linear Regression Model in Simulink with Blocks

조회 수: 6 (최근 30일)
Hamza Farah
Hamza Farah 2023년 11월 5일
댓글: Hamza Farah 2023년 11월 6일
Hi, I was wondering how I could implement my trained linear regression model on Simulink, the model involves training a sinusoidal wave that has 100 samples to apply a gain to its amplitude. How would I go about creating a function for such a model, and what kind of blocks would I use on Simulink?

채택된 답변

Drew
Drew 2023년 11월 6일
Since 23a, MathWorks provides a Regression Linear Predict block for Simulink. See https://www.mathworks.com/help/stats/predict-responses-using-regression-linear-predict-block.html
More generally, see the "Regression Predict Blocks" section of the page https://www.mathworks.com/help/stats/code-generation.html
If this answer helps you, please remember to accept the answer.
  댓글 수: 4
Hamza Farah
Hamza Farah 2023년 11월 6일
Yes I have already trained my model. I have tried to input my model that I made with the fitlm function, and I keep getting this error on the linear regression block.
Hamza Farah
Hamza Farah 2023년 11월 6일
Hi Drew, I managed to find the problem, thanks for the help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multiple Linear Regression에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by