Fitting straight lines for each row and column of a data
조회 수: 2 (최근 30일)
이전 댓글 표시
I have two 1-dimensional arrays x[] and y[], which when plotted looks like the attached image: layout.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/152606/image.png)
I wanted to fit straight lines to each row and column separately and display them all in a single image like in the attached image: output.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/152607/image.png)
Finally, determine the error distance of each point to its fitted line.
I am looking for ideas to code the for loop to identify the right (x,y) points: first for fitting each line, and later for calculating the error distance of each point belonging to that line only.
Thanks very much
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!