how to confine the solutions when solving a system of equations

1 次查看(过去 30 天)
hi,
how can I set the interval of definition of variables, solves using the function solve ()?
interval solution: x0<x<x1, y0<y<y1, z0<z<z1, equations to resolve: f(x,y)=0,f(x,z)=0 and f(y,z)=0

回答(1 个)

Walter Roberson
Walter Roberson 2015-5-18
In the solve() documentation read down to "Solving Inequalities". You can, for example,
syms x y
f = .... some formula
solve(f, x0 < x, x < x1, y0 < y, y < y1)
  1 个评论
studentU
studentU 2015-5-18
编辑:studentU 2015-5-18
>> i try to run: >> syms x y G F X1 X2 el
[a,b] = solve('G*cos(y)+F*sin(y)=1',' cos(y)*sin(el)-sin(y)*X2*cos(x)-sin(y)*X3*sin(x)=1','-90<y','y<90','-180<x','x<180');
but it's generate this error:
z = C_ z13 = C_ z23 = C_ z33 = C_
> In solve at 94 ??? Error using ==> solve>assignOutputs at 153 6 variables does not match 2 outputs.
Error in ==> solve at 97 varargout = assignOutputs(nargout,sol);

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by