How to separate the integer value of a real number
조회 수: 3 (최근 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
추가 답변 (1개)
참고 항목
카테고리
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!