how to allocate a matrix less than 1 to a variable?

3 ビュー (過去 30 日間)
Jon Snow
Jon Snow 2014 年 5 月 17 日
編集済み: Azzi Abdelmalek 2014 年 5 月 17 日
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?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 5 月 17 日
編集済み: Azzi Abdelmalek 2014 年 5 月 17 日
a = [.2 , .3 , 2 , 5 , .7 , 8]
b=a(a<=1)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by