faq
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
faq [2011/12/31 18:54] – aan | faq [2012/04/01 20:21] (current) – aan | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Frequently Asked Questions ====== | ====== Frequently Asked Questions ====== | ||
- | This page is to answer your frequently-asked questions related to this course. | ||
- | /* | + | ===== FAQs for Assignment |
- | ===== FAQs for Assignment | + | |
- | ===I have trouble solving Question 5. Could you give us more hints?=== | + | === When I press c or m on the keyboard, the Correct/ |
- | There are a few ways to write this program. I assume that you have no problem | ||
- | reading the input file into a matrix. One way to write the rest of the program is | ||
- | to use a loop to go through all the rows in the matrix. In each pass of the loop, you | ||
- | take the information in one row of the matrix (which contains a person' | ||
- | height in cm, weight in kg, BMI value and BMI category). | ||
- | === To answer | + | The reason why your " |
+ | MATLAB automatically scales | ||
+ | in your plot command. That is, the value limits of x and y axes depend on the minimum and maximum values in the 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. | ||
- | No, you cannot change your function for the first question in order to answer | + | This problem can be solved by using the **axis** command |
- | question. Your program for the second question has to call the function that only | + | of x and y axes after you use the plot command |
- | takes a scalar as the input argument. This can be easily done by using a loop. | + | if the x and y coordinates of all your points are between 0 and 1, you can use [0 1 0 1] with your axis command. Please see the lecture notes for more details on this command. |
===== FAQs for Assignment 3 ===== | ===== FAQs for Assignment 3 ===== | ||
- | === I am unable to save a MATLAB script file on my computer. When I tried to save it, it is saved at the drive at York. Can I submit | + | === In Question 5 b), we are asked to display |
- | A couple of ways to solve this problem: | + | The fprintf command. To display the marks for all the students, use a loop statement. |
- | 1. In the Editor window of MATLAB, save the file to your local disk C by selecting "Save as" from the File menu, and then in the pop-up window clicking on small down-pointing arrow beside the "Save in: " slot and choosing "Local disk (C: on ....)" | + | === When submitting files from home, my computer does not allow me to access any files that are located |
- | + | ||
- | 2. Copy and paste each program into Nodepad and save each program as a .txt | + | |
- | file and then change the extension of the file name to from .txt to .m . Changing the file name can be done by right-clicking on the file name (in the folder that contains the file) and selecting " | + | |
- | submitting the files using the .txt extension is ok. That is, the file names | + | |
- | can be a3q1.txt, a3q2.txt .... | + | |
- | + | ||
- | + | ||
- | === I am having trouble figuring out how to find the maximum value for question 2, could you give some tips? === | + | |
- | + | ||
- | Look at Exercises 1 and 2 in the lecture notes on Feb 3rd. They both find the biggest | + | |
- | number, but from smaller scales of vectors. Look at the solution to Exercise | + | |
- | 2, and extend it to find the biggest number from a vector of 4 values, and | + | |
- | then 5 values. Hope you see the repetitions and use a loop to implement | + | |
- | it. | + | |
- | + | ||
- | === For Part c) of Question 4, how can I take the dates in which the temperature in Anchorage was higher than the on in New York? === | + | |
- | + | ||
- | You need to put the dates one by one into a vector during the loop. After the loop you just need to print out the vector. See the solution to Exercise 7 in Feb 10th lecture notes. In that solution, a vector " | + | |
- | + | ||
- | ===== FAQs for Assignment 2 ===== | + | |
- | + | ||
- | === For Question 6, when I entered the command to add the Science mark as the last column in the matrix, the matrix was displayed as follows: === | + | |
- | 1.0e+003 * | + | |
- | Columns 1 through 5 | + | |
- | + | ||
- | 2.3450 | + | |
- | 1.2340 | + | |
- | 5.4320 | + | |
- | 3.4560 | + | |
- | 6.5430 | + | |
- | 7.6540 | + | |
- | 4.5670 | + | |
- | + | ||
- | Column 6 | + | |
- | + | ||
- | 0.0760 | + | |
- | 0.0890 | + | |
- | 0.0845 | + | |
- | 0.0720 | + | |
- | 0.0875 | + | |
- | 0.0725 | + | |
- | 0.0825 | + | |
- | + | ||
- | === This is strange. Did I do anything wrong? === | + | |
- | + | ||
- | No, nothing is wrong. The display is fine. The values | + | |
- | multiplied by 10 to the power of 3. See slide 22 of January 27th slides. We | + | |
- | didn't get the chance to talk about it in class. But everything was fine in | + | |
- | your output display. | + | |
- | + | ||
- | ===== FAQs for Assignment 1 ===== | + | |
- | + | ||
- | === What does the exclamation marks (!) in the first question mean? === | + | |
- | + | ||
- | n! means the factorial of n. See http:// | + | |
- | of factorial. Note that MATLAB has a built-in function factorial(x) | + | |
- | factorial of x. It was listed | + | |
- | + | ||
- | === Do I need to put the output of the programs in the a1.txt file? === | + | |
- | + | ||
- | No, you only need to put the programs in the a1.txt file. There is no need to put the | + | |
- | output of your programs in the file. */ | + | |
- | + | ||
- | /* Here, you can list frequently asked questions from your students along with responses. | + | |
- | + | ||
- | ====== General ====== | + | |
- | + | ||
- | ===== Do I need to register for a CSE Computer Account? ===== | + | |
- | + | ||
- | Yes. | + | |
- | + | ||
- | ===== Do I need to attend class? ===== | + | |
- | + | ||
- | If you wish to pass. | + | |
- | + | ||
- | ====== Tests ====== | + | |
- | + | ||
- | ===== Do I need to write all tests? ===== | + | |
- | + | ||
- | + | ||
- | ... but of course. */ | + | |
+ | 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.1325357695.txt.gz · Last modified: 2011/12/31 18:54 by aan