1 visualizzazione (ultimi 30 giorni)
Sangita Kamat il 6 Set 2018
Modificato: sangita kamat il 8 Set 2018
q1=[q11; q21; q13];
q10=[7.1892; 11.4189; 0.5826];
t1 = pi:0.1:2*pi;
dq11dt1= -k1*(12.7734-q11)*cos(q31);
dq21dt1=-k1*(12.7734-q11)*sin(q31);
dq31dt1= -k2*(0.3097+(13.6167-q21)*sin(t1));
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposte (1)

Aquatris il 7 Set 2018
Modificato: Aquatris il 7 Set 2018
First you create your function that outputs derivative of q when time and q are given to it.
function qd = asd(t,q)
k1 = 1.2;
k2 = 1.3;
k3 = 1.5;
qd = [-k1*(12.7734-q(1))*cos(q(3));
-k1*(12.7734-q(1))*sin(q(3));
-k2*(0.3097+(13.6167-q(2))*sin(t))];
end
Then in the main script, you call
q10=[7.1892; 11.4189; 0.5826];
t1 = pi:0.1:2*pi;
[t,q] = ode45(@asd,t1,q10);
You did not specify k1 k2 k3 so I randomly selected them.
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
sangita kamat il 8 Set 2018
Modificato: sangita kamat il 8 Set 2018
@Aquatris, thank you very much for your help. Shall do.its perfectly working . thanks once again

Accedi per commentare.

### Categorie

Scopri di più su Ordinary Differential Equations in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by