Create a column vector from 15 to -25 with a step size of 5
조회 수: 45 (최근 30일)
이전 댓글 표시
I need help with a problem. Create a column vector from 15 to -25 with a step size of 5. This is what I have prob04=[15;5;-25]; and all I get is a column of just 15,5,-25. I'v tried to resolve it.
댓글 수: 0
답변 (2개)
Christoph S
2020년 7월 28일
An easy way to do this would be
prob04 = 15:-5:25;
If you want to turn it into a column vector you can then just use the transpose operator
prob04 = prob04.';
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Linearization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!