how to write 12 digit after comma
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    vaya putra
      
 el 13 de Jul. de 2019
  
    
    
    
    
    Comentada: vaya putra
      
 el 13 de Jul. de 2019
            i read in vtk file as input file
D= [ '      0.99999884292 0.99999951733 1 0.99999737897 0.99998922997 0.99998569147  0.99999033688 0.99999377443 1 1 0.99999976986 0.99999785577]
E=sscanf(D,'%f');
E =[1 1 1 1 1 1 1 1 1 1 1 1]; %result
but i do not want that, what i needed is [0.99999884292 0999xx .... ...... ..]
i tried 
E=sscanf(D.'%1.12f') did not worked
0 comentarios
Respuesta aceptada
  madhan ravi
      
      
 el 13 de Jul. de 2019
        format longg
E=sscanf(D,'%f')
3 comentarios
  madhan ravi
      
      
 el 13 de Jul. de 2019
				I get:
E =
             0.99999884292
             0.99999951733
                         1
             0.99999737897
             0.99998922997
             0.99998569147
             0.99999033688
             0.99999377443
                         1
                         1
             0.99999976986
             0.99999785577
Más respuestas (0)
Ver también
Categorías
				Más información sobre Low-Level File I/O 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!

