Can you help me with this programming assignment?

Unfortunately, MIT's policy on Academic Integrity prevents us from assisting with most questions related to problem sets or coursework. Some of our student consultants may be in the same class as you, for example, which might lead to them seeing your code. It's also very possible for consultants to lead you astray without meaning to. For example, your professor might give you a problem set in order that you can learn how to use some specific concept or construct. But the consultant who helps you might suggest a completely different way of doing things, a way which might be better in some circumstances, but not for your class.

If in doubt, please approach your TA or professor, or ask another student in the class (if permitted). Many classes use specialized software that we can't support or may use libraries or macros for existing packages that we may not have access to.

To summarize: If, for example, MATLAB is failing to load, please don't hesitate to contact us. However, if MATLAB is not giving the answer you expect, or displays error messages when trying to run a .m file, you are better off checking with your TA first.