Problem with built in and interp1
이전 댓글 표시
All, I'm having an issue that built in cant find the native interp1 function, see code below:
% initialsie
x = [0:0.1:2*pi];
% run a check on syntax and method:
default = sin ( x );
check = builtin ( 'sin', x );
% is it equal? It should be:
isequal ( default, check )
% now I try the same for interp1
default2 = interp1 ( x, check , pi/2 )
% try the same with the builtin command:
check2 = builtin ( 'interp1', x, check, pi/2 );
??? Error using ==> builtin
Cannot find builtin function 'interp1'
Computer details: Windows XP - r2010b
Is this expected behaviour? Is it repeated on other versions/platforms?
I have interp1 overloaded - because the inbuilt interp1 has poor error messages - but I want to be able to run the built in one to verify that the results of the two are the same (automated testing), the only way I can think to do it other than built in is to remove the path to the overloaded one - but it would mean a lot of rmpath, addpath etc.... So I'd like a neater solution...
Thanks
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Performance and Memory에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!