Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How to generate sequence integers between two ranges?

Asked by Andre on 3 Apr 2014
Latest activity Edited by dpb on 3 Apr 2014

Hi,

how can I generate sequenced integer numbers between two floats ?

Example 1:

Ranges: [93.9688 96.9688] Output: [93.9688 94 95 96.9688]

Example 2:

Ranges: [3.025 6.95] Output: [3.025 4 5 6 6.95]

Andre

0 Comments

Andre

Tags

Products

No products are associated with this question.

1 Answer

Answer by dpb on 3 Apr 2014
Edited by dpb on 3 Apr 2014
Accepted answer
a=[a(1) floor(a(1))+1:floor(a(end)) a(end)];

0 Comments

dpb

Contact us