How can I subtract consecutive numbers from one starting point?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone,
So I have an array which I want to subtract from a starting point. Lets say I have a list of numbers [1,2,3,4 etc.] and I would like to subtract these from 200. So 200-1=199, 199-2=197, 197-3=194, 194-4=190. How can I do this. I need the array to maintain the same amount of vectors to plot my graph afterwards.
Thank you in advance.
1 commentaire
Jos (10584)
le 12 Fév 2019
I do not know what "I need the array to maintain the same amount of vectors to plot my graph afterwards." means, but see my answer below :-)
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!