Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: help me plot this code  urgency
Posted:
Jan 24, 2013 5:54 PM


"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=((1eps)*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



