Create a column vector with elements counting down from 200 to 0 in increments of 5
조회 수: 22 (최근 30일)
이전 댓글 표시
I created the vector, C= [200:-5:0] and I git an error that reads, Variable C must have size[41 1]. It is currently of size [1 41]
댓글 수: 1
Stephen23
2023년 8월 2일
Note that the square brackets are completely superfluous. The MATLAB approach is simply:
C= 200:-5:0;
답변 (1개)
Clay Swackhamer
2022년 8월 1일
Try transposing your output to flip it from a row vector (list of numbers going horizontally) to a column (list of numbers going vertically) like this:
C = C'
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!