fit() throwing exception 'Error using cfit/subsref>iParenthesesReference (line 36) Too many inputs to CFIT/SUBSREF.'
显示 更早的评论
I am trying to use the fit() function.
botEdgeFit = fit(botEdgeNew(:,1), botEdgeNew(:,2), 'poly2');
However it throws the exception:
Error using cfit/subsref>iParenthesesReference (line 36)
'Too many inputs to CFIT/SUBSREF.
Error in cfit/subsref (line 15)
out = iParenthesesReference( obj, currsubs );
Error in Overlaying2 (line 320)
botEdgeFit = fit(botEdgeNew(:,1), botEdgeNew(:,2), 'poly2');
The problem is that sometimes it works, and sometimes it doesn't. I have tried it multiple times and can promise you I am not changing a single thing. I honestly have no idea what's going on here. The inputs are the same size:
>> size(botEdgeNew(:,1))
ans =
857 1
>> size(botEdgeNew(:,2))
ans =
857 1
Any help would be greatly appreciated. Thanks!
3 个评论
dpb
2020-8-1
Would have to see the actual data for each of case that works and that doesn't...I would venture a guess (Crystal Ball Toolbox not yet having been released) perhaps in the case that fails you may have a cell array which has gotten expanded into comma-separated list, thus triggering the message.
Shay Lebovitz
2020-8-1
dpb
2020-8-2
Well, again, we don't either because we don't have anything to work with...need a sample case that fails as a minimum that somebody can run here...and as said, w/o more than just one line in isolation we can't tell anything about what other code there is ahead that could have done something inadvertently...as said, didn't/don't have the Crystal Ball Toolbox.
回答(0 个)
类别
在 帮助中心 和 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!