Error using latex in function
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Eitan Schechtman
el 21 de Mzo. de 2016
Respondida: Walter Roberson
el 21 de Mzo. de 2016
Hello, I'm trying to use latex to insert a specific symbol using the "text" command in Matlab 2014b. The line in my function is pretty straightforward:
text(1.5,0.43,'\fontname{Lucida sans unicode}\fontsize{12}?')
(the symbol appears as a box in the Matlab editor window)
When using this line in a function, a question mark is displayed instead of the symbol. However, when using the same line from the command window the symbol appears with no problems. Finally, I tried inserting a breakpoint at this line in the function and then inserting it to the command line - and it also works fine.
Any ideas regarding how I can display the symbol without resorting to breakpoints as a way of life?
Thanks, Eitan
0 comentarios
Respuesta aceptada
Walter Roberson
el 21 de Mzo. de 2016
Is the symbol one whose Unicode position is 256 or greater? If so then you might not be able to hard-code without taking special steps to convert your MATLAB to use UTF8 .m files. Try building up a string with char() of the numeric position, such as
text(1.5, 0.43, ['\fontname{Lucida sans unicode}\fontsize{12}', char(1234)])
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre LaTeX 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!