How can I change the numbers to negative without altering the positive ones and make a sum of that? This is the serie 1-2+3-5+8-13+21-34+...
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
n=8;
F=[1 2];
suma=0;
for i=3:n
F(i)=F(i-1) + F(i-2);
end
disp(F)
this is only for show the positive serie
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!