how to display number in decimal ?
    24 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hello everyone, I have tried :
 format long 
 format short 
 value=double(value)
and the output still fraction number how can I convert it to decimal ?
3 Commenti
  Walter Roberson
      
      
 il 13 Lug 2018
				int(value) is an error unless the value is symbolic.
Perhaps the user wants
format bank
for 2 decimal places. Or perhaps the user wants fix() or floor() . Or perhaps round() with a particular number of decimal places.
  Stephen23
      
      
 il 13 Lug 2018
				Reema Alhassan discusses this in much more detail here:
Risposte (1)
  Steven Lord
    
      
 il 14 Lug 2018
        Since it's likely the "fraction number" is stored as a symbolic object, try calling either the vpa function or the double function with your symbolic number as input.
0 Commenti
Vedere anche
Categorie
				Scopri di più su Logical 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!




