How to solve 3 linear equations symbollically?

1 回表示 (過去 30 日間)
Aman
Aman 2024 年 6 月 5 日
編集済み: Torsten 2024 年 6 月 5 日
b1_position_minus_o4= [ 27.4622 , -4.7904 , 0];
syms omega_output_x omega_output_y omega_output_z real
omega_output = [omega_output_x; omega_output_y; omega_output_z];
% Velocity of point b1
v_b1 = cross(omega_output, (b1_position_minus_o4));
disp(v_b1);
v_a1= [-80.0000 -7.1960 0];
velocity_eq = v_a1 - v_b1
velocity_eq = 
double(solve(velocity_eq(1),omega_output_z))
ans = -16.7001
double(solve(velocity_eq(2),omega_output_z))
ans = -0.2620
omega_output_sol = solve(velocity_eq == 0, [omega_output_x, omega_output_y, omega_output_z])
omega_output_sol = struct with fields:
omega_output_x: [0x1 sym] omega_output_y: [0x1 sym] omega_output_z: [0x1 sym]
% Convert symbolic solution to numeric values
omega_output_numeric = double([omega_output_sol.omega_output_x, omega_output_sol.omega_output_y, omega_output_sol.omega_output_z]);
%disp('Output angular velocity (omega_output):');
disp(omega_output_numeric);
%I want numerical values of omega_output_x, omega_output_y, omega_output_z
%Please help someone

採用された回答

Torsten
Torsten 2024 年 6 月 5 日
移動済み: Torsten 2024 年 6 月 5 日
The first two equations in "velocity_eq" only have "omega_output_z" as variable and contradict each other (see above).

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by