Constant variable
古いコメントを表示
To my last question, it does not need to increase by exactly 20, just 20 or more. Could I write: col3select=[0; doff(info(:,3))] >20;
回答 (1 件)
Geoff
2012 年 3 月 20 日
Well, you want greater-or-equal. So replace the == with >=
Also, if you want to clarify an answer to a question, please write a comment on the particular answer instead of starting a new question.
Edit, following new revelations =P
Okay, you used confusing language and did not explain your problem clearly.
There may be clever ways to do this is, but I think you would benefit most from a simple and self-explanatory loop:
overThreshold = false;
col3select = false(size(info,1), 1);
for r = 1:size(info,1)
if info(r,3) >= 520
overThreshold = true;
elseif info(r,3) <= 500
overThreshold = false;
end
col3Select(r) = overThreshold;
end
5 件のコメント
justin
2012 年 3 月 21 日
Jan
2012 年 3 月 21 日
Baseline?? It increases by 20??
If you are talking about a program, which is posted in another thread, please post the link.
justin
2012 年 3 月 21 日
Geoff
2012 年 3 月 22 日
@Jan: Unfortunately, justin deleted the original question that I answered, because he wanted to ask a question about my answer. But I'm in a good mood today.
Geoff
2012 年 3 月 22 日
Oh, my bad, that was someone else... He just asked a new question instead. heheh
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!