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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by