From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Undefined function for function_handle
Date: Sat, 27 Nov 2010 02:39:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 26
Message-ID: <icpr08$dqv$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1290825544 14175 (27 Nov 2010 02:39:04 GMT)
NNTP-Posting-Date: Sat, 27 Nov 2010 02:39:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2626460
Xref: comp.soft-sys.matlab:690373

I need to find the roots of an equation later on. Because of my equation, r is too long, i have to separate the terms in a few parts. However, by doing this, it shows an error:

syms y;
syms z;

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.*((JR1a.*Y1b-JR1b.*Y1a)./(JRa.*Y1b-JR1b.*Ya))


??? Undefined function or method 'times' for input arguments of type
Anyway i can solve the error?