MATLAB: How to find x of y by y of x on a equation

i need to find x of y by y of x
for example if i have y = 2*x
i need to find x so the answer is x = (1/2)*y
how to do that using Matlab

Best Answer

syms x y
eqn = y == 2*x
solve(eqn, x)
Related Question