Read before posting in the MATLAB forum

shwaipshwaip bluffin' with my muffin Icrontian
edited April 2011 in Science & Tech
What is this forum?
A few of our members are proficient in MATLAB, and happily volunteer their time and skills to help you get over hurdles in the coding process.

If your code isn't behaving properly, or is giving you errors, we will gladly take a look and help.

What isn't this forum?
We are not here to do your homework. Do not post the problem and say "how do I do this?".

We are not here to teach you MATLAB from nothing. This is related to the first point. Don't just ask "How do I do this in MATLAB?".


How should I get help?
First, search this forum to see if anyone else had the same question.
If it hasn't been asked, go ahead and start a new thread. Post what you're trying to do AND the code that you've written so far. If you are getting errors, post them as well

Posting Code
put the code in the appropriate tags:

[php]
for ii = 1:5
     x(ii) = ii^2;
end
[/php]

will make it look like this:
for ii = 1:5
     x(ii) = ii^2;
end

without the tags, it looks like this:

for ii = 1:5
x(ii) = ii^2;
end

Comments

  • drasnordrasnor Starship Operator Hawthorne, CA Icrontian
    edited January 2011
    Despite the post above, invariably we get asked this question the most:

    How do I {task} in MATLAB?

    The answer is simpler than you might think. Start by asking yourself this question:

    How do I {task}?

    The difference is subtle but important. If you don't know the algorithm you're trying to implement, you're screwed. There are various ways to unscrew yourself but most of them we can't help you with (e.g. reading your textbook or notes or asking your TA or professor.) Some of us know about the finer points of computer image analysis, Bode-Nyquist plots, numerical integration, linear algebra, et al. but we're not going to tutor you when you don't pay attention in class unless we're really, really bored.

    For many problems, MathWorks has an application note on their site or on MathWorks Community/MATLAB Central that explains exactly how to do the task you're trying to accomplish or one very similar to it. Bookmark those two links if you haven't already. The examples included with the MATLAB helpfiles are also instructive.

    If these online resources don't get you sorted out, you should really talk to your professor or TA because you have a fundamental lack of understanding of how to accomplish the task you've been assigned. It's their job to give you that understanding and you're paying them so get your money's worth.
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited April 2011
    ardichoke wrote:
    In addition to all that has been said above... If you really don't understand how to complete the task you have been assigned, most schools have learning centers with upperclassmen/grad students who have a firm grasp of what you're learning. Go talk to them. They get paid, out of your tuition dollars, to be there and to help you. We do not.

    Getting errors in your code that you don't think should be happening?

    1) Develop your code in stages. Don't write it all and hope it will work. Write code a few lines at a time, and test the results to make sure your code does what you think. Test your functions independently

    2) Use matlab's built in debugger. Either set breakpoints manually (click on the little line next to the line number in matlab's editor) or type 'dbstop if error' in the main matlab window before running a script. 'dbstop if error' makes matlab enter the debugger when there is an error, rather than stopping the completion completely. Try to use the debugger to determine what variables have unexpected values.
Sign In or Register to comment.