Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1290825544 14175 172.30.248.37 (27 Nov 2010 02:39:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 27 Nov 2010 02:39:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2626460
Xref: news.mathworks.com 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))

Error:

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