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 (최근 30일)
이전 댓글 표시
s=[(0.1):(0.7)]
s =
0.1000
this keeps only showing only 0.1 as the resultant.
댓글 수: 1
답변 (2개)
Star Strider
2022년 10월 12일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!