Search All of the Math Forum:

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

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

 Messages: [ Previous | Next ]
 ghasem Posts: 118 Registered: 4/13/13
dow define a numeric variable (no symbolic)?
Posted: May 9, 2013 3:19 AM

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")?

Date Subject Author
5/9/13 ghasem
5/9/13 Nasser Abbasi
5/9/13 Alan Weiss