hi,
i have a symbolic equation and i want to solve with initial values which is x=1.2, y=1.2
syms x y;
u = -x^2 + x - y + 0.75;
v = x^2 - 5*x*y - y;
dux=diff(u,x);
duy=diff(u,y);
dvx=diff(v,x);
dvy=diff(v,y);
xi = x - (u*dvy - v*duy)/((dux*dvy)-(duy*dvx))
how to solve xi = ? initial values are x=1.2 and y =1.2
or
simplify(xi)
6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)
how to solve above equation in x=1.2 and y=1.2
thanks a lot.
|
|
0
|
|
|
|
Reply
|
klutch
|
12/3/2010 1:45:25 PM |
|
"klutch " <klutch52@gmail.com> wrote in message
news:idas9l$pmo$1@fred.mathworks.com...
> hi,
>
> i have a symbolic equation and i want to solve with initial values which
> is x=1.2, y=1.2
>
> syms x y;
> u = -x^2 + x - y + 0.75;
> v = x^2 - 5*x*y - y;
>
> dux=diff(u,x);
> duy=diff(u,y);
> dvx=diff(v,x);
> dvy=diff(v,y);
>
> xi = x - (u*dvy - v*duy)/((dux*dvy)-(duy*dvx))
>
> how to solve xi = ? initial values are x=1.2 and y =1.2
Your use of DIFF and your use of the term "initial values" makes me think
you're trying to solve a differential equation (for which DSOLVE would be
the appropriate tool) but your xi doesn't include any derivative terms, so
I'm not _really_ sure what you're trying to do. Please reply and clarify
your exact goal.
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlab.wikia.com/wiki/FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|
|
0
|
|
|
|
Reply
|
Steven_Lord
|
12/3/2010 2:38:01 PM
|
|
> Your use of DIFF and your use of the term "initial values" makes me think
> you're trying to solve a differential equation (for which DSOLVE would be
> the appropriate tool) but your xi doesn't include any derivative terms, so
> I'm not _really_ sure what you're trying to do. Please reply and clarify
> your exact goal.
i have a function
z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)
now i want to know value of the z(x,y) function where x=1.2 and y=1.2.
z(1.2 , 1.2) = ?
but the function is symbolic, it's not double. how to solve symbolic function in certain value of x, y.
--------
if the func is double, just write like that.
x=1.2;
y=1.2;
z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)
ans=1.5435
|
|
0
|
|
|
|
Reply
|
klutch
|
12/3/2010 4:47:05 PM
|
|
"klutch " <klutch52@gmail.com> wrote in message <idb6u9$cej$1@fred.mathworks.com>...
> > Your use of DIFF and your use of the term "initial values" makes me think
> > you're trying to solve a differential equation (for which DSOLVE would be
> > the appropriate tool) but your xi doesn't include any derivative terms, so
> > I'm not _really_ sure what you're trying to do. Please reply and clarify
> > your exact goal.
>
> i have a function
>
> z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)
>
> now i want to know value of the z(x,y) function where x=1.2 and y=1.2.
>
> z(1.2 , 1.2) = ?
>
> but the function is symbolic, it's not double. how to solve symbolic function in certain value of x, y.
>
> --------
> if the func is double, just write like that.
>
> x=1.2;
> y=1.2;
> z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1)
>
> ans=1.5435
%%%%
syms x y
z = 6/5 - (- 5*x^3 + 3*x^2 + (19*x)/4 + 3/4)/(- 10*x^2 + x + 5*y + 1);
subs(z,{x y},{1.2 1.2})
|
|
0
|
|
|
|
Reply
|
Sean
|
12/3/2010 5:00:22 PM
|
|
> subs(z,{x y},{1.2 1.2})
thanks a lot. it works :)
|
|
0
|
|
|
|
Reply
|
klutch
|
12/3/2010 5:35:05 PM
|
|
|
4 Replies
414 Views
(page loaded in 0.087 seconds)
Similiar Articles: how to solve symbolic function with initial values - comp.soft-sys ...hi, i have a symbolic equation and i want to solve with initial values which is x=1.2, y=1.2 syms x y; u = -x^2 + x - y + 0.75; v = x^2 - 5*x*... solve - Undefined function or variable 'I' - comp.soft-sys.matlab ...how to solve symbolic function with initial values - comp.soft-sys ... solve - Undefined function or variable 'I' - comp.soft-sys.matlab ..... you use a quoted string for ... Initial value of Embedded Matlab Function - comp.soft-sys.matlab ...how to solve symbolic function with initial values - comp.soft-sys ... Symbolic Math (subs function) - comp.soft-sys.matlab... how to solve symbolic function with initial ... Assigning value to symbolic expressions in vector - comp.soft-sys ...... Math (subs function) - comp.soft-sys.matlab... the L vector ... the expression BEFORE calling DSOLVE. fcn = subs ... how to solve symbolic function with initial values ... Symbolic Math (subs function) - comp.soft-sys.matlabSymbolic Math (subs function) - comp.soft-sys.matlab... how to solve symbolic function with initial values ... I can't do it from an embedded function ... Solving and plotting - comp.soft-sys.matlabhow to solve symbolic function with initial values - comp.soft-sys ... Solving and plotting - comp.soft-sys.matlab... all constants for which I have values. ode23 - comp.soft-sys.matlabhow to solve symbolic function with initial values - comp.soft-sys ... Solve initial value problems for ordinary differential equations ... ode23, ode45, ode113, ode15s ... Use of uninitialized value in open - comp.lang.perl.misc ...how to solve symbolic function with initial values - comp.soft-sys ... initial values are x=1.2 and y =1.2 Your use of DIFF and your use of the term "initial values ... trouble solving system of linear equations for symbolic ...... some other function for solving nonlinear systems of equations then ... has a "jacobian" function in the symbolic ... values for some or all of the symbolic ... Given the ... How to write a code for iteration process - comp.soft-sys.matlab ...... code to calcuate a value from guessing its initial value ... OK, so that would be your guess_values() function function ... am not sure how to write FSOLVE codes to solve ... how to solve symbolic function with initial values - comp.soft-sys ...hi, i have a symbolic equation and i want to solve with initial values which is x=1.2, y=1.2 syms x y; u = -x^2 + x - y + 0.75; v = x^2 - 5*x*... Ordinary differential equation and system solver - MATLABS = dsolve(eqn,cond,Name,Value) Y ... equation, you must create a symbolic function ... Solve this ordinary differential equation with the initial and boundary conditions. 7/26/2012 5:40:59 AM
|