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: complicated equation including bessel functions
Replies: 22   Last Post: May 8, 2013 2:43 PM

Advanced Search

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

Posts: 88
Registered: 4/13/13
Re: complicated equation including bessel functions
Posted: May 8, 2013 2:18 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> See above about FSOLVE versus SOLVE. Either keep all your calculations
> symbolic or keep all your calculations numeric. Mixing the two requires
> additional care.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

=============================
No,i know that fslove and fzeros are for numeric calculations.
in fact,I use from syms,so that I can define a parameter in intermediate parameters.see my code,please:
syms bet % bet is my unknown
for i = 1: 100
% eps1 , k1,k2,k0 are known complex constant.
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);

exp1(i) = X1.*(besselj(1,T).*X3 - bessely(1,T).*X4)-...
X2.*(besselj(0,T).*X3 - bessely(0,T).*X4);

my_guess = (i/100) +1j*(k0+(i/m));
exp2(i) = fsolve(@(bet)eval(exp1(i)),my_guess);

real_ans(i) = real(exp2(i));
imag_ans(i)= imag(exp2(i));
end
%
I used from fsolve for syms variable with " fsolve(@(bet)eval(exp1(i)),my_guess)"
by this command,you can use from fsolve,when your unknown is defined as symbolic.
this is not my problem.
my problem is that how solve "exp1" in the above?because my arguments in bessel functions are complex.
ghasem


Date Subject Author
5/7/13
Read complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
Torsten
5/8/13
Read Re: complicated equation including bessel functions
Bruno Luong
5/8/13
Read Re: complicated equation including bessel functions
Torsten
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
Bruno Luong
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
Nasser Abbasi
5/8/13
Read Re: complicated equation including bessel functions
Bruno Luong
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
Torsten
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
Torsten
5/8/13
Read Re: complicated equation including bessel functions
Bruno Luong
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
Bruno Luong
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
Steven Lord
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
Steven Lord
5/8/13
Read Re: complicated equation including bessel functions
ghasem
5/8/13
Read Re: complicated equation including bessel functions
ghasem

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.