Trying to fill an empty array
조회 수: 3 (최근 30일)
이전 댓글 표시
This is a bit complex and I am fairly new to matlab but I need to create a for loop for specific time ranges and then have this data be filled into an empty array and I am not quite sure how to go about it. Any help would be appreciated. Thanks.
댓글 수: 0
채택된 답변
Sulaymon Eshkabilov
2021년 6월 6일
There are a couple of crucial errs in your screenshoted code.
(1) In "if" statement condition 2 after && sign "g(ii)" is missing
(2) In "elseif" statement, the same type of err
(3) No need, "else" part. Since no outputs are to be produced
(4) "empty_array" has to have an index, e.g.: empty_array(ii) = g(ii);
댓글 수: 0
추가 답변 (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!