problem in generate code using cftool
1 次查看(过去 30 天)
显示 更早的评论
hi.i obtain mean of coloumn in matrix and curve fitting by cftool. then save generate code of it. but when I call it in the my code gives me an error message. What can I do?
% mean of matrix meanValue = mean(G);
x=1:1:47; y=meanValue; n=createFit(x,meanValue);
error is:
??? Error using ==> createFit Too many output arguments.
Error in ==> pixel at 35 n=createFit(x,meanValue);
thank you
0 个评论
回答(1 个)
Geoff Hayes
2014-5-22
Check the signature of the createFit function. Does it actually return something? i.e. if the signature is just:
function createFit(x,y)
then you will get the too many output arguments error since the above code is
n=createFit(x,meanValue);
i.e. the code is trying to get the return value of a function that does not return anything. There seems to be different versions of createFit on the MATLAB FileExchange and elsewhere too, so please verify that you are using the expected/correct version. I was able to reproduce your error using the code found at http://code.google.com/p/prosilica/source/browse/trunk/MATLAB/createFit.m?r=36
15 个评论
Geoff Hayes
2014-5-23
I think that we have covered why you were getting the error (that you posted). Is there something else that is preventing you from moving forward?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!