brownfox

Writing Impositions in Matlab

Writing Impositions in Matlab

This post is for students who do not do their homework (like me when I was in school) and are punished with writing impositions. The imposition would usually be writing something like a very long statement with no meaning several times. Like back in my school days, when we were told to write them on paper using a pen or pencil. But these days students and truants are asked (ordered!) to write them in a word-processing software. Well, we can think of using the classic trick of Ctrl+C and Ctrl+V, but it depends on the imposition type, right!

Like for say here, we are asked to write this statement :

“The quick brown fox jumps over the lazy dog”.

And the teacher asks you to change every vowel with its preceding vowel in each iteration.That would mean , in my first statement, a is replaced to e, e is replaced by i, i is replaced by o, o is replaced by u, and u is replaced by a. In subsequent iterations, the replaced vowels are replaced by their preceding vowel. And this has to be done say 100 times. (Quite a tough punishment!). This case can not be done in MS Word or any other word processor, so the student has to do type this manually each time or just do his homework instead.

However, good news! I have a Matlab code for you, which will do it for you however number of times you want to write. In the end, all you have to do copy the final output to a word processor  and get the print. The code is as simple it can be without using any library functions so that people with no knowledge about Matlab can still use, because then it is just English to understand.

You can get the code here, and use an online compiler to run it .

Download code here:

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter Captcha : * Time limit is exhausted. Please reload CAPTCHA.