function[returnString] = createBlockImages(s) %% What this code does is, given an input string of captial letters, passes %% consecutive letters (first is current location, second is next location) %% into blockGeneration (the function that actually %% generates the block and saves it to a folder 'blockImages' under your %% working directory. %% ** YOU HAVE TO CREATE A DIRECTORY CALLED blockImages' IN YOUR WORKING %% DIRECTORY, OTHERWISE YOU GET THE COMPLAINT %% Could not open file for writing. Check directory or file permissions. %% %% For the last letter of the sequence, it has the next %% waypoint as 'END'. For all letters NOT in the given sequence, it %% creates an image that has itself as current and next. %% %% Ex. you make a call to generateBlocks %% createBlockImages('ABCXYZ'); %% and get images for: A->B, B->C, C->X, X->Y, Y->Z, Z->End %% %% zoomFactor is a "played with" variable that was correct for the %% printer at C-Core; for future use, you'll likely need to play with it %% again zoomFactor = 56; %% letterPicked keeps track of which letters have already been assigned letterPicked = zeros(1, 26); for i = 1:(size(s, 2) - 1) blockGeneration(s(i), s(i+1), zoomFactor); letterPicked(double(s(i) - 64)) = 1; end blockGeneration(s(size(s, 2)), 'END', zoomFactor); letterPicked(double(s(size(s, 2))) - 64) = 1; %% now doing self-reference block for i = 1:26 if (letterPicked(i) == 0) blockGeneration(char(i + 64), char(i + 64), zoomFactor); end end