How to round numbers to specific near point?
    6 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Triveni
      
 el 22 de Jun. de 2022
  
    
    
    
    
    Respondida: Stephen23
      
      
 el 22 de Jun. de 2022
            I have a vector
A =
          6.1
         6.04
         5.98
         5.92
         5.86
          5.8
         5.74
         5.69
         5.63
         5.57
         5.52
         5.46
         5.41
    i want to round it near 0.05, 
A =
 6.1
6.05
6
5.9
5.85
.
.
.
Please help me.
0 comentarios
Respuesta aceptada
  Stephen23
      
      
 el 22 de Jun. de 2022
        A = [6.1;6.04;5.98;5.92;5.86;5.8;5.74;5.69;5.63;5.57;5.52;5.46;5.41]
N = 0.05;
B = round(A/N)*N
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Matrix Indexing en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

