- Core MATLAB: Simple linear regression using the \ operator.
- Core MATLAB: Fit a first-order linear polynomial with polyfit. https://www.mathworks.com/help/matlab/ref/polyfit.html . Note that the "Extended Capabilities" section of the doc page mentions that polyfit supports "C/C++ Code Generation".
- With Statistics and Machine Learning Toolbox: Use fitlm. https://www.mathworks.com/help/stats/fitlm.html
Does Matlab provide online linear fitting?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi all,
I am looking for Matlab function or framework to perform linear fitting online, meaning I am looking for updating my linear model once new observations become available.
댓글 수: 0
답변 (1개)
Drew
2023년 8월 22일
편집: Drew
2023년 8월 23일
There are many ways to perform linear fitting in MATLAB. This page lists some of the methods: https://www.mathworks.com/help/matlab/data_analysis/linear-regression.html.
Here are some options (out of many) from that page:
You mention that you want to "perform linear fitting online". What is your deployment scenario? You can take a look at some deployment options at https://www.mathworks.com/company/newsletters/articles/selecting-a-matlab-application-deployment-strategy.html, https://www.mathworks.com/help/compiler/getting-started-with-matlab-compiler.html and https://www.mathworks.com/help/compiler/standalone-applications.html.
A more general intro to data fitting in MATLAB can be found at https://www.mathworks.com/discovery/data-fitting.html
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!