How to separate the integer value of a real number
4 次查看(过去 30 天)
显示 更早的评论
For example a variable A is calculated as {2.951,5.420,8.062,4.963, .....} I want A to have just the integer values of these real numbers, i.e. A={2,5,8,4,....}
0 个评论
采纳的回答
Sachin Ganjare
2012-9-26
编辑:Sachin Ganjare
2012-9-26
Just use Floor function.
A_INT = floor(A);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!