help-octave
[Top][All Lists]

## Re: How can I get an angstrom symbol in Octave?

 From: Brett Green Subject: Re: How can I get an angstrom symbol in Octave? Date: Sun, 22 Sep 2019 12:34:54 -0400

Thank you all very much!

Doug, your solution worked for me. This is a great relief - thank you!

Dmitri, thank you for the informative explanation and good questions. When I cut and paste "Å" into Octave, nothing appears in the terminal. If I run from a .m file with the character "Å" in the title, it instead prints "Ã..." where "Å" should be.

Doug, how did you find out that [char(195) char(133)] was the combination you needed? According to the ASCII table I looked up, those two are ├ à. I realized I also need an em dash which would be ASCII character 196, but Octave crashes whenever I try to plot something with char(196) in it.

This isn't as important because I can work around it (since the regular minus is only too small if I use e^{-qd} instead of exp(-qd) - i.e. by writing things without subscripting) but would be nice if there's a simple explanation. If it's not an easy fix, though, don't trouble yourself with it. I appreciate all that you've done already!

- Brett Green

On Sun, Sep 22, 2019 at 4:26 AM chs <address@hidden> wrote:
On 2019-09-22 04:06, Brett Green wrote:
> Using single quotes (without \$) was all I needed to change to get the
> degree symbol to appear. Thank you!
>
> Now I'm wondering why using single vs. double quotes makes a
> difference... what's important, though, is that it works.
>
> ...Actually, I may have written that prematurely. Although I can get the
> degree symbol, I still can't get the angstrom symbol. \AA and \r{A} were
> suggested but neither worked. Any ideas why not?

These both work in MATLAB, so this sounds like an Octave bug.

BTW, it's also worth mentioning that in LaTeX, \deg is actually an operator:

\deg:
macro:->\mathop {\operator@font deg}\nolimits

And this is what MATLAB gives you for '\$\deg A\$'.