using for loop to create a vector
조회 수: 2 (최근 30일)
이전 댓글 표시
How can I use for loop command to assign a value to an odd or even element of the index?
"M" "T" "W" "Th" "F" "Sa" "Su"
"30" "45" "30" "0" "90" "45" "30"
It will look something like this. at the same time, I want to produce a result that is divisible by 7 so that the number of week is complete no matter the number of days i entered.
댓글 수: 0
답변 (1개)
Tesfaye Girma
2021년 2월 23일
for weeks = "M" "T" "W" "Th" "F" "Sa" "Su";
days="30" "45" "30" "0" "90" "45" "30"
disp(weeks)=odd
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!