How can I get my distance variable to be [0.1:0.7] to show as [0.1,0.2,0.3,0.4,0.5,0.6,0.7]
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
s=[(0.1):(0.7)]
s =
0.1000
this keeps only showing only 0.1 as the resultant.
1 Kommentar
Antworten (2)
Star Strider
am 12 Okt. 2022
The default ‘step’ using the colon operator is 1, so the condition is immediately satisfied and only the first element appears.
An alternative —
s = linspace(0.1, 0.7, 7)
.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!