output the ohms symbol
조회 수: 94 (최근 30일)
이전 댓글 표시
How can i output the ohms symbol using fprintf?
fprintf('The resistance for the given color bands is 26000 ohms')
댓글 수: 0
채택된 답변
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
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 Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!