Reputation: 306
When using symbolic expression, the question is how to convert symbolic value to discrete value and obtain z value.
x=2
syms x
y=x^2
z=x+y
Upvotes: 1
Views: 92
Reputation: 133
syms x y
y = x^2
z = x+y
y_function = matlabFunction(y);
z_function = matlabFunction(z);
x = 2;
z_function(2)
Upvotes: 1