Create a row vector named x that starts at 1, ends at 5, and each element is separated by 0.5.

38 views (last 30 days)
The : operator uses a default spacing of 1, however you can specify your own spacing, as shown below.
x = 20:2:26
x =
20 22 24 26
TASK
Create a row vector named x that starts at 1, ends at 5, and each element is separated by 0.5.

Answers (1)

KSSV
KSSV on 22 Jun 2021
iwant = 1:0.5:5 ;
Read the documentation please.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!