Re: solving an equation



Nasser Abbasi wrote:



"farshad" <farshad.kooshesh@xxxxxxxxx> wrote in message
news:ef52ef1.-1@xxxxxxxxxxxxxxxxxxxxxxxxxx
HI
Please help,what is my mistake in this code:
(I want to solve an equation like below)

clear all
syms x
ga=input ('ga')
gb=input ('gb')
f=(ga*gb*(pi/x)^2-36)/(6*(ga+gb))-(pi/x)/tan(pi/x)
solve(f,'x')

Matlab gives me this error

??? Attempt to execute SCRIPT solve as a function.

Error in ==> D:\MATLAB6p5\toolbox\symbolic\@sym\solve.m
On line 49 ==> [varargout{1:max(1,nargout)}] = solve(S{:});

Error in ==> d:\MATLAB6p5\work\solve.m
On line 6 ==> solve(f,'x')

Thank you

try to rename your file in work\solve.m to something like
work\mysolve.m
and see if that helps.

Nasser




Thank you for your help
My problem in renaming my mfile solved but I still cant solve my
equation.

my equation is:

(a*b*(pi/x)^2-36)/(6*(a+b))-(pi/x)/tan(pi/x)=0

where a,b are reading from input
a=input ('a')
b=input ('b')

and 0<x<inf

please help me how I can find x.
thank you.
.



Relevant Pages

  • Re: symbolic calculation with the specified criteria to have a convergent integral.
    ... did not you means the syms are positive?? ... Definite integration: Can't determine if the integral is ... Not a valid symbolic expression. ...
    (comp.soft-sys.matlab)
  • Re: solving an equation
    ... Please help,what is my mistake in this code: ... Matlab gives me this error ... try to rename your file in work\solve.m to something like work\mysolve.m ...
    (comp.soft-sys.matlab)
  • Re: symbolic computation
    ... Nasser Abbasi wrote: ... Because of must deteminate ... where are B-nonzero matrix. ...
    (comp.soft-sys.matlab)
  • solving an equation
    ... Please help,what is my mistake in this code: ... Matlab gives me this error ... Attempt to execute SCRIPT solve as a function. ...
    (comp.soft-sys.matlab)