How to use loop to reduce the code?
Afficher commentaires plus anciens
clc
clear
syms t sigma
r = -4;
w = 2;
a = 1;
b = 1;
W = 1;
A_sin = 1;
A_sigma = [0,1;
-w^2,-a*((A_sin*sin(W*sigma)^2)/w^4)-b*x_2+r];
A_1 = int((A_sigma),sigma, 0, t) ;
A_2 = int((A_sigma*A_1),sigma, 0, t);
A_3 = int((A_sigma*A_2),sigma, 0, t);
A_4 = int((A_sigma*A_3),sigma, 0, t);
A_5 = int((A_sigma*A_4),sigma, 0, t);
phi = [1 0; 0 1]+ A_1+A_2+A_3+A_4+A_5;
The code I have is to integrate 5 times
How to write the for loop so that I can intergrate for 1000 times
Thank you!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!