Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: help me plot this code -- urgency
Date: Thu, 24 Jan 2013 22:54:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <kdse2g$nv3$1@newscl01ah.mathworks.com>
References: <kdsank$br5$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1359068048 24547 172.30.248.48 (24 Jan 2013 22:54:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 24 Jan 2013 22:54:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:787338

"maia " <antonietta.arista@yahoo.com> wrote in message <kdsank$br5$1@newscl01ah.mathworks.com>...
> syms k r n teta z
> n=0:1:5;
> ........
> pin2=((1-eps)*besseli(n,k*re).*besselk(n,k*rs).*diff(besselk(n,k*rs))).*(1./(eps*diff(besselk(n,k*rs)).*besseli(n,k*rs)-besselk(n,k*rs).*diff(besseli(n,k*rs))));
> pin3=2*pin2.*pin1.*pin.*cos(n.*teta);
\- - - - - - - - - - -
  In your expression for 'pin2' you have both besselk(n,k*rs) and diff(besselk(n,k*rs)), but these are of different sizes since 'diff' reduces the length by one and an error message would be the result.  Also I doubt if 'besseli' and 'besselk' will accept symbolic variables such as k.

  One other point.  It is inadvisable to use 'sum' as the name of a variable since that conflicts with the reserved name of matlab's 'sum' function.

Roger Stafford