output the ohms symbol

180 Ansichten (letzte 30 Tage)
Jose Grimaldo
Jose Grimaldo am 16 Feb. 2020
Bearbeitet: Walter Roberson am 16 Feb. 2020
How can i output the ohms symbol using fprintf?
fprintf('The resistance for the given color bands is 26000 ohms')

Akzeptierte Antwort

Stephen23
Stephen23 am 16 Feb. 2020
>> fprintf('The resistance for the given color bands is 26000 Ω\n')
The resistance for the given color bands is 26000 Ω
>> fprintf('The resistance for the given color bands is 26000 \x2126\n') % hex
The resistance for the given color bands is 26000 Ω
>> fprintf('The resistance for the given color bands is 26000 \20446\n') % octal
The resistance for the given color bands is 26000 Ω
  1 Kommentar
Walter Roberson
Walter Roberson am 16 Feb. 2020
Bearbeitet: Walter Roberson am 16 Feb. 2020
fprintf('The resistance for the given color bands is 26000 %c\n', char(937));
937 (0x3A9) and 8486 (0x2126) have the same decomposition; as far as Unicode cares, they are both the same greek letter. It would, however, be permissible for the two to have different glyphs, I think
The symbols that Stephen used reached my browser as 937 characters.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Voronoi Diagram finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by