MATLAB: “solve” Function

equationMATLABsolve

I'm trying to use the "solve" function to find a variable, but the other variables in the equation are input as opposed to defined. How do I fix this? Here's to illustrate what I'm trying to do using a simplified equation:
x=input('x = ')
y=input('y = ')
z=solve('x+y=z',z)

Best Answer

Did you solve the license problem? Until you have the software installed and licensed, solve() isn't going to work.
The answer you are looking for is along these lines:
syms x y z
xin = input('x =');
yin = input('y =');
zsol = solve('z-y=x', z);
disp(['z = ' char(zsol)]);
znum = double(subs(zsol, {x, y}, {xin, yin}));
disp(['z = ' num2str(znum)]);