Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How do I index through logical vectors properly?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hiya,
I have this piece of code (see image below).
1. when I run it, it does everything except the most important part, i.e the if statement (see image below).
2. I'm also struggling to attach the newly-created 'correction_b' column to the main all_baseline_data array --> all_baseline_data(:,25) = judgment_error_b(correction_b);
I have a hunch the problem is in the logical vs scalar dimensions, but I'm unsure.
Thank you in advance
댓글 수: 0
답변 (1개)
Walter Roberson
2016년 4월 4일
inside your "for i" loop, every place you have judgement_error_b, you need to index it at i, such as
if judgement_error_b(i) < -1280
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!