for loop that will iterate through the integers from 32 to 255. show the corresponding character from the character encoding
조회 수: 4 (최근 30일)
이전 댓글 표시
how do i write a script for a loop that will iterate through the integers from 32 to 255 and show the corresponding character from the character encoding
댓글 수: 0
답변 (2개)
Tim Jackman
2015년 9월 16일
Loop through and display each corresponding ASCII character? So something like this?
for ii = 32:255
disp(char(ii))
charact(ii-31) = char(ii);
end
Stephen23
2015년 9월 16일
편집: Stephen23
2015년 9월 17일
Like most MATLAB code it is easier and faster without a loop:
>> char(32:255)
ans =
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!