Matlab publish to pdf unicode characters print statements
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
I am trying to publish my code to pdf and use unicode characters as mathmatical variables. A simplified example would be:
% delta
fprintf('\x03B4\n')
Output: 
δ
I would like this to show up in the published pdf but the output is replaced with '#' instead.
0 Commenti
Risposte (1)
  Bhanu Prakash
      
 il 10 Lug 2024
        Hi Brandon,
This issue might occur if MATLAB didn't interpret the unicode properly. Instead you can use either of the following two commands to get the output as 'δ':
fprintf('%s\n', char(0x03B4)) % command-1
fprintf('%s\n', char(hex2dec('03B4'))) % command-2 using hex2dec
For more information on the 'hex2dec' funciton, you can refer to the following documentation:
Hope this helps!
Vedere anche
Categorie
				Scopri di più su Characters and Strings 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!