Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: dow define a numeric variable (no symbolic)?
Replies: 2   Last Post: May 9, 2013 8:32 AM

Advanced Search

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

Posts: 86
Registered: 4/13/13
dow define a numeric variable (no symbolic)?
Posted: May 9, 2013 3:19 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi
I have one question.
I have a long equation including a unknown and three intermediate parameter.
I want to write my equation step by step,as following:

% eps1 , k1,k2,k0 are known complex constant and bet is my unknown.
gam = sqrt(bet^2 - k1^2);
T = sqrt(bet^2 - k2^2);
tau = sqrt(bet^2 - k0^2);
%
X1 = gam*besseli(0,gam);
X2 = T*(eps1*besseli(1,gam)-(1-eps1)*gam.*besseli(0,gam));

X3 = -T*tau*bessely(0,T)*besselk(1,tau)-...
tau^2*bessely(1,T)*besselk(0,tau);
X4 = -T*tau*besselj(0,T)*besselk(1,tau)-...
tau^2*besselj(1,T)*besselk(0,tau);

obviously,I get this error:
??? Undefined function or variable 'bet'.
because I don't define bet in gam,T,tau expressions.
how define "bet" as a numeric unknown (I don't want use from "syms bet")?



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.