Matlab solver results in empty sym: 0-by-1
Show older comments
Hello,
I thought that the equation I was solving was fairly simple. I am trying to solve for theta from the equation.
The solver results in empty sym: 0-by-1.
What am I missing here? There is 1 unknown and one equation. I thought the abs() command would take care of the complex numbers on its own?
theta_value should be close to 0.244.
syms s theta Y Z omega
%Hertz
f =186;
%Input Amplitude (m/s^2)
A_o = 3;
%Damping coefficient (N*s/m)
C_d = 0.07;
%Resistance R_c (Ohms)
R_c = 40;
%Resistance R_l (Ohms)
R_l = 5000;
%Inductance L_c (Henrys)
L_c = 0.051;
%Mass (kg)
M=0.01;
%Spring coefficient (N/m)
k = 13660;
%Frequency (rad/s)
omega_in = 2*pi*f;
Z1 = R_c+R_l+L_c*s;
Z2 = C_d+k/s+M*s;
V_l = (theta*(Y*s)*R_l)/Z1;
Z_in=(Y*s*Z2+theta*V_l/R_l)/(s^2*M);
Transfer_func = simplify(V_l/Z_in);
Transfer_func(s) = vpa(simplify(V_l/Z_in),5);
Transfer_func(omega) = subs(Transfer_func, {s},{1j*omega});
%Solving system of matrices for magnitude of V_l(omega*j)/Z_in(omega*j)
A = [ 3 ];
B = [0.1037];
X1 = linsolve(A,B);
%Solving equation for value of theta
mag_VZ = abs(Transfer_func(omega_in))
X2 = mag_VZ == X1;
theta_value = solve(X2,theta)
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!