for loop that will iterate through the integers from 32 to 255. show the corresponding character from the character encoding

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

Respuestas (2)

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
Like most MATLAB code it is easier and faster without a loop:
>> char(32:255)
ans =
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨&copy;ª«¬­&reg;¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 16 de Sept. de 2015

Comentada:

el 17 de Sept. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by