Duplicating part of a matrix

1 回表示 (過去 30 日間)
Michael
Michael 2014 年 11 月 22 日
コメント済み: Michael 2014 年 11 月 22 日
Say I have a row vector, and I want to make another vector of all the values in the other one greater than some threshold. I can probably do this with an if inside a for loop, or something like that, but is there a specific command for this?
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 11 月 22 日
there is no a specific command for a general question, can you post an example?

サインインしてコメントする。

採用された回答

the cyclist
the cyclist 2014 年 11 月 22 日
A = [1 2 3 4 5 6 7];
B = A(A>4);
  1 件のコメント
Michael
Michael 2014 年 11 月 22 日
Sweet! Just what I hoped for.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by