how to allocate a matrix less than 1 to a variable?
조회 수: 3 (최근 30일)
이전 댓글 표시
So lets say I have matrix a = [.2 , .3 , 2 , 5 , .7 , 8]
I want to allocate all values of a <= 1 to a variable b. so b should contain .2, .3, .7
How do I do this?
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2014년 5월 17일
편집: Azzi Abdelmalek
2014년 5월 17일
a = [.2 , .3 , 2 , 5 , .7 , 8]
b=a(a<=1)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!