for theta=1:10
x_3 = cos(theta);
syms x;
x_2 = 'x_3 - cos(x+theta)';
a = solve(x_2,x)
end
When I run this code, the solutions for a include x_3 and theta instead of substituting them with the values defined above. How can I solve this using the actual values of x_3 and theta?
It is a problem of mixing
symsand strings?Try:
or