hi there i want to get the values of A1,A2,A2,Q1,Q2,Q3 , i have six equations and six initial conditions as Xo, Vo kindly suggest me solution

3 Ansichten (letzte 30 Tage)
for i = 1:1:3
x(t) = U(i,1)*A1*cos(w2(1,1)*t + Q1) + U(i,2)*A2*cos(w2(2,2)*t + Q2) +U(i,3)*A3*cos(w2(3,3)*t + Q3);
x= x(t);
v= diff(x(t));
end
x
v
Xo = [1 0 0]
Vo = [0 0 0]
% eqns = [x(1,1) == Xo(1,1) , x(1,2) == Xo(1,2), x(1,3) == Xo(1,3), v(1,1) == Vo(1,1) , v(1,2) == Vo(1,2), v(1,3) == Vo(1,3)];
% S = solve(eqns,[A1 A2 A3 Q1 Q2 Q3])

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 2 Aug. 2022
for i = 1:1:3
x{i} = U(i,1)*A1*cos(w2(1,1)*t + Q1) + U(i,2)*A2*cos(w2(2,2)*t + Q2) +U(i,3)*A3*cos(w2(3,3)*t + Q3);
v{i} = diff(x{i}, t);
end
Xo = [1 0 0]
Vo = [0 0 0]
eqns = [x{1} == Xo(1,1) , x{2} == Xo(1,2), x{3} == Xo(1,3), v{1} == Vo(1,1) , v{2} == Vo(1,2), v{3} == Vo(1,3)];
S = solve(eqns,[A1 A2 A3 Q1 Q2 Q3])
  14 Kommentare

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by