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

38 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

KSSV
KSSV il 22 Giu 2021
iwant = 1:0.5:5 ;
Read the documentation please.

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by