User Tools

Site Tools


faq

This is an old revision of the document!


Frequently Asked Questions

FAQs for Assignment 5

=== when I press c or m on the keyboard, the Correct/Incorrect/Invalid keeps appearing at random locations. How do I make it in a way that it always appears in the middle? ===

The reason your “Correct!”, “Incorrect!” or 'Invalid!“ is shown at random places is that MATLAB automatically scales the axes based on the values in x and y vectors in your plot command. Thus, an absolute position such as (0.4, 0.5) may not be the center of your figure window.

This problem can be solved by using the axis command to set the value limits of x and y axes after you use the plot command to draw the small shapes. For example, if the x and y coordinates of all your points are both between 0 and 1, you can use [0 1 0 1] with your axis command. Please see the lecture notes on this command.

FAQs for Assignment 3

In Question 5 b), we are asked to display the total marks using only one digit after the decimal point. The "format bank" command displays two digits after the decimal point. Which command should we use for this question?

The fprintf command. To display the marks for all the students, use a loop statement.

When submitting files from home, my computer does not allow me to access any files that are located in my WebFAS folder that they are saved to in Matlab. How can I submit the files?

One way to do it is to copy and paste the content of a file into a .txt file on your local computer and then either submit the .txt files or change the file name suffix from txt to m and submit the .m files.

faq.1333310725.txt.gz · Last modified: 2012/04/01 20:05 by aan