output the ohms symbol

181 ビュー (過去 30 日間)
Jose Grimaldo
Jose Grimaldo 2020 年 2 月 16 日
編集済み: Walter Roberson 2020 年 2 月 16 日
How can i output the ohms symbol using fprintf?
fprintf('The resistance for the given color bands is 26000 ohms')

採用された回答

Stephen23
Stephen23 2020 年 2 月 16 日
>> 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 件のコメント
Walter Roberson
Walter Roberson 2020 年 2 月 16 日
編集済み: Walter Roberson 2020 年 2 月 16 日
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.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVoronoi Diagram についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by