How to parametrize a function ?

4 visualizaciones (últimos 30 días)
abdulsamed kaymakci
abdulsamed kaymakci el 8 de Dic. de 2022
Comentada: abdulsamed kaymakci el 9 de Dic. de 2022
So i have function like y^(0.5) = x this function created by syms command and id like to replace x with t and find y in terms of t. then r =[x,y] disp(r)

Respuesta aceptada

John D'Errico
John D'Errico el 8 de Dic. de 2022
syms x y
eq = sqrt(y) == x;
syms t real
ysol = solve(subs(eq,x,t),y,'returnconditions',true)
ysol = struct with fields:
y: t^2 parameters: [1×0 sym] conditions: 0 <= t
The constraint tells you that t must be positive. This is because the original equation was written as sqrt(y), which presumes the positive branch of the square root function.
  1 comentario
abdulsamed kaymakci
abdulsamed kaymakci el 9 de Dic. de 2022
And sir its not leaving alone y when y has a power for example x^3 == y^2

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Numbers and Precision en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by