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!