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

8 views (last 30 days)
stephen aboasu
stephen aboasu on 16 Sep 2015
Commented: stephen aboasu on 17 Sep 2015
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

Answers (2)


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

Community Treasure Hunt

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

Start Hunting!

Translated by