Error using cfit/subsref when trying to fit a smoothingspline
조회 수: 3 (최근 30일)
이전 댓글 표시
According to documentation, if a fittype is specified, the output becomes [curve,gof] = fit(x,y,fttype)
My code is shown as follows:
A = importdata('exp65_C1.SS');
[x,y] = prepareCurveData(A(:,1),A(:,2));
[fit_o,~] = fit(x,y,'smoothingspline');
I get the error:
Error using cfit/subsref
Too many output arguments.
When I execute the fit line. I checked that x and y are both single column vectors of size 12776x1, and both have the same dimensions. The data goes from 0 to 0.83 for x, and 0 to 726 for y.
When I remove the ~ since it said I have too many output arguments, it gives this error instead:
Error using cfit/subsref>iParenthesesReference (line 36)
Too many inputs to CFIT/SUBSREF.
Error in cfit/subsref (line 15)
out = iParenthesesReference( obj, currsubs );
Which makes sense since fttype requires more than one output. Same error if I don't specify an output at all.
What is going on?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 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!