Help! How do I comprehend this Matlab code?

<p>I am very new to Matlab. </p>

<p>However as part of my work, I have to modify an already written Matlab code. This code has few comment statements making understanding difficult. Besides, most variables used within the code have not been defined. HOW WILL I NOW UNDERSTAND WHAT THE AUTHOR MEANT TO DO?</p>

<p>Morever, I am very new to matlab. Any ideas on how best to comprehend this code fast? DEADLINE VERY NEAR! Urgent replies, please</p>

<p>Get a good introduction book or find an instructor who can look at the code :)</p>

<p>Hi ele902, Many thanks. Which introductory texts would get round this problem? There is no instructor to assist.</p>

<p>I posted this on the other tread:</p>

<p>This is the best book I found for those who never use Matlab before:</p>

<p>MATLAB: An Introduction with Applications (Paperback)</p>

<p>Read the review to see whether its worth your time or not:
Amazon.com: MATLAB: An Introduction with Applications: Amos Gilat: Books</p>

<p>Is this for a job? If so, ask your boss or colleagues. Better yet, if you know who wrote the code, ask him/her.</p>

<p>Also, in the future: whenever you get a large piece of code with no comments, print it out. Then, take the pages and use them to wrap as big a rock as you can. Finally, take this rock and beat the everloving snot out of the author.</p>

<p>Comment your code people. Don’t get beaten by rocks.</p>

<p>Another option is to take out the semicolons in the code and type in line by line into the Matlab command line. The semicolons are used to suppress output so if you can see the output resulting, it’ll give you a better idea of what each line is doing. You could also throw some fprintf(‘variables’) out in the code if the semicolon outputs aren’t very clear.</p>

<p>Hope this helps/good luck!
doglvr</p>

<p>Hi everyone, thank you so much for your wonderful suggestions.</p>

<p>Hi ele902, SPECIAL thanks for the book you suggested. I have ordered it and hope to receive within the next few days. </p>

<p>Hi everyone, have you any further suggestions on best books and weblinks for matlab beginners? I want to get to speed within the shortest possible time. Cheers!</p>