フィルターのクリア

Help with if function

1 回表示 (過去 30 日間)
Riddyl
Riddyl 2016 年 8 月 23 日
コメント済み: Stephen23 2016 年 8 月 23 日
I tried searching for my answer, but as a matlab novice I'm struggling to make sense of some of the information out there.
I am trying to replicate a basic if function from excel as the data size has become too vast for the software to run smoothly. Basically I want to say:
If 'value in column A' is greater than 'constant value stored as a variable' then return 1, otherwise return zero. Further to this, I would like the information returned as a column vector.
I tried fiddling around with for loops but couldn't get the desired result.

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 8 月 23 日
cste=10
A=[23 5 6 11 8 20 0 1]
idx=A>cste

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by