How to separate the integer value of a real number
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Sachin Ganjare
il 26 Set 2012
Modificato: Sachin Ganjare
il 26 Set 2012
Just use Floor function.
A_INT = floor(A);
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!