The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: help me plot this code -- urgency
Replies: 2   Last Post: Jan 25, 2013 5:13 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Roger Stafford

Posts: 5,929
Registered: 12/7/04
Re: help me plot this code -- urgency
Posted: Jan 24, 2013 5:54 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"maia " <> wrote in message <kdsank$br5$>...
> 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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.