
How to write 2 didgits after decimal in text figure like given below
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Megha
 el 7 de En. de 2019
  
    
    
    
    
    Comentada: madhan ravi
      
      
 el 7 de En. de 2019
            how to print on a figure the text like
here p1 = 0.234567546485, k1 = 0.045677869
text(800,0.3,['\Delta = ' num2str(fprintf('%.2f',(k1*100))),newline,'S = ' num2str(fprintf('%.2f',(p1*100)))],...
    'FontWeight','bold','FontSize',12);
I want o/p like
 and in the next line below
 and in the next line below
Can anyone please help!
0 comentarios
Respuesta aceptada
  madhan ravi
      
      
 el 7 de En. de 2019
        
      Editada: madhan ravi
      
      
 el 7 de En. de 2019
  
      a=['\Delta = ',sprintf('%.2f\n',(k1*100)),...
    'S = ',sprintf('%.2f',(p1*100))];
text(800,0.3,a,...
    'FontWeight','bold','FontSize',12);

2 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Data Type Conversion 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!

