output the ohms symbol
272 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jose Grimaldo
el 16 de Feb. de 2020
Editada: Walter Roberson
el 16 de Feb. de 2020
How can i output the ohms symbol using fprintf?
fprintf('The resistance for the given color bands is 26000 ohms')
0 comentarios
Respuesta aceptada
Stephen23
el 16 de Feb. de 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 comentario
Walter Roberson
el 16 de Feb. de 2020
Editada: Walter Roberson
el 16 de Feb. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Tables 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!