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!