Duplicating part of a matrix

1 次查看(过去 30 天)
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);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by