How can I subtract consecutive numbers from one starting point?
Show older comments
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 Comment
Jos (10584)
on 12 Feb 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 :-)
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!