Watch this Author's files
@ Nicholas: You probably didn't put the function file in the same folder as your .m file from which you are calling the function...
@Stephen: Do you know any other algorithms for finding all of the roots on the interval?
Hi, i used this program to solve my equations but i couldn't get the roots. Could you please help me to identify any mistakes that i have made? Thank you in advance.
JRa= @(y) besselj(1,y); JR1a= @(y) besselj(0, y) - besselj(1, y)./y;
JRb= @(y) besselj(1,z); JR1b= @(y) besselj(0, z) - besselj(1, z)./z;
Yb= @(y) bessely(1,z); Y1b= @(y) bessely(0, z) - bessely(1, z)./z;
Ya= @(y) bessely(1,y); Y1a= @(y) bessely(0, y) - bessely(1, y)./y;
r=@(y) y.*((JR1a.*Y1b-JR1b.*Y1a)./(JRa.*Y1b-JR1b.*Ya)); u=FindRealRoots(r,0,10,10)
The errors are as follows: ??? Undefined function or method 'times' for input arguments of type 'function_handle'.
Error in ==> @(y)y.*((JR1a.*Y1b-JR1b.*Y1a)./(JRa.*Y1b-JR1b.*Ya))
Error in ==> FindRealRoots>chebft at 73 f(k)=funhandle((y*bma)+bpa); % depend on funhandle being a
Error in ==> FindRealRoots at 14 c=chebft(funhandle,a,b,n);
Contact us at files@mathworks.com