When I try and use the fzero function but keep getting this error:
Error using fzero (line 289) FZERO cannot continue because user supplied
function_handle ==> SCC failed with the error below.
Not enough input arguments. Error in a6q7 (line 10) q=fzero('SCC',1);
The script is as follows:
clear all clc z=sqrt(2)*sin(pi/4); A =z*z; B =z^0.5; C =3+2*z; x=0:10; y=SCC(x,A,B,C); plot(x,y) q=fzero('SCC',1);
And the function SCC is:
function y = SCC(x,A,B,C) y=A.*sin(x).*cos(x)+B.*cos(C.*x); end
Thanks for any help!
Best Answer