How to output Ohm symbol on command window?

20 visualizzazioni (ultimi 30 giorni)
Karla Solis
Karla Solis il 21 Set 2018
Risposto: Star Strider il 21 Set 2018
I can't figure out how to output the ohm symbol. I've found some codes that say to add \Omega, but it does not work. I am trying to put it on an fprintf statement.

Risposte (1)

Star Strider
Star Strider il 21 Set 2018
This works for me in R2018b:
Ohm = char(hex2dec('03A9'));
fprintf(1, '1V/1A = 1%s\n', Ohm)
producing:
1V/1A = 1Ω

Categorie

Scopri di più su Labels and Annotations 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!

Translated by