trying to call a function from a function file in a script file
func = afunction; %trying to make the variable func equivalent to "afunciton",
% the function I created in the afunction file but it doesn’t work 🙁
llim = -5;
ulim = -1;
options = optimset(‘Display’,’iter’,’TolX’,10^-7,’Maxiter’,500);
[x] = fzero(@func, [llim ulim],options);
I have a seperate function file called afunction that has the function afunction (which just has like a f(x)= … function in it), but when I try to run this code the error says "Execution of script afunction as a function is not supported:
/Users/my name/Documents/MATLAB/afunction.m" in line 2func = afunction; %trying to make the variable func equivalent to "afunciton",
% the function I created in the afunction file but it doesn’t work 🙁
llim = -5;
ulim = -1;
options = optimset(‘Display’,’iter’,’TolX’,10^-7,’Maxiter’,500);
[x] = fzero(@func, [llim ulim],options);
I have a seperate function file called afunction that has the function afunction (which just has like a f(x)= … function in it), but when I try to run this code the error says "Execution of script afunction as a function is not supported:
/Users/my name/Documents/MATLAB/afunction.m" in line 2 func = afunction; %trying to make the variable func equivalent to "afunciton",
% the function I created in the afunction file but it doesn’t work 🙁
llim = -5;
ulim = -1;
options = optimset(‘Display’,’iter’,’TolX’,10^-7,’Maxiter’,500);
[x] = fzero(@func, [llim ulim],options);
I have a seperate function file called afunction that has the function afunction (which just has like a f(x)= … function in it), but when I try to run this code the error says "Execution of script afunction as a function is not supported:
/Users/my name/Documents/MATLAB/afunction.m" in line 2 function call MATLAB Answers — New Questions