making an array 'skip' some numbers
Show older comments
Hi everyone,
I am trying to make an array that looks for example like this:
x= -4 -3 -2 2 3 4
So in this example I skipped the -1 the 0 and the 1. How can I make somethink like this in matlab?
Thanks in advance
Accepted Answer
More Answers (3)
Doubutsu
on 19 Feb 2014
0 votes
Jos (10584)
on 19 Feb 2014
A = -5:0.5:-3.5
B = 3.2:0.2:3.8
C = [A B]
C = sort(C) % if A and B overlap?
help colon
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!