Problem with built in and interp1
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Performance and Memory in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!