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: how solve this equation with one unknown?
Replies: 6   Last Post: May 6, 2013 10:38 AM

Advanced Search

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

Posts: 118
Registered: 4/13/13
Re: how solve this equation with one unknown?
Posted: May 6, 2013 8:55 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> WHat correction?
> I can't run your code as you post it.
> You should post complete, selft contained code that
> runs. Make sure it is all in segment, clearly delimited
> so someone who wants to copy it, knows where it starts
> and where it ends.
> So, try again. Post complete working code, then
> may be you'll have better chance of someone helping
> you better.

ok,you right.
my code (with correction) is as following:
my code is :
gr1 = sqrt(-100 - my_var^2);
gr2 = sqrt(-150 - my_var^2);
gr3 = sqrt(-70 - my_var^2);
% matrix elements are:
a11 = gr1.^2.*besseli(0,gr1);
a12 = -gr2.^2.*besseli(0,gr2);
a13 = -gr2.^2.*besselk(0,gr2);
a14 = 0;
a21 = gr1.*besseli(1,gr1);
a22 = -gr2.*besseli(1,gr2);
a23 = gr2.*besselk(1,gr2);
a24 = 0;
a31 = 0;
a32 = gr2.^2.*besseli(0,gr2);
a33 = gr2.^2.*besselk(0,gr2);
a34 = -gr3.^2.*besselk(0,gr3);
a41 = 0;
a42 = gr2.*besseli(1,gr2);
a43 = -gr2.*besselk(1,gr2);
a44 = gr3.*besselk(1,gr3);
A_matrix = [a11 a12 a13 a14 ; a21 a22 a23 a24 ; a31 a32 a33 a34 ; a41 a42 a43 a44];
det_A = det(A_matrix);
solving = fzero (det_A , guess);

obviously,I get this error:
??? Undefined function or variable 'my_var'.
how introduce "my_var" to matlab?
please help me...

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.