MATLAB: External function calling inside another function

matlab function

Can an external function created be called inside another function.Please explain with an example. Thanks.

Best Answer

Definitely yes, provided the path of the external function (m file/m script) exists in the matlab path.
.m
function script1(arg1, arg2, arg3)
....
....
x=script2(arg4,arg5);
script2.m
function y=script2(arg6, arg7, arg8)
y=arg6 + arg7...