Please use and before you begin, i.e., type these commands into the command window. condenses the command window output and reduces the floating point numbers in MATLAB to 4 decimal places. If problems require answers with more decimal places, you may use to get 8 decimal places. If you have ANY doubt about the syntax you are using to invoke a particular elementary function such as exp, cos, sin, etc., then type into the command window. stands for elementary functions and this command provides a list of elementary functions with their corresponding MATLAB syntax. Remember to use a semicolon ; to suppress output when the output is not necessary. Exercise 1: You need to use a period preceding any matrix operations. Remember that +,-,*, /, ^ are all considered matrix operations in MATLAB. Thus, if you declare a row vector = 0:pi/4:5*pi/4, then cos( ) is a row vector as well with the same dimensions as . So cos( ) inherits the dimensions of This is a very important concept moving on. So if we try to multiply cos( ), we will get an error because we are multiplying a row vector by a row vector. From Linear Algebra, we know we cannot do this. We can only multiply row vectors by column vectors and vice versa. Therefore, we need to input a period preceding
the matrix operators * to indicate that we want to multiply each element of the row vectors , i.e., we type cos( ). We use the period (or dot) preceding matrix operators when we are dealing with functions. Exercise 2: See page 3 of the protocol. Exercise 3: Remember, if we wish to plot cos( ) vs , we must first declare the row vector prior to creating the row vector cos( ) since cos( ) depends on . If we declare cos( ) first, then MATLAB will use the present value of saved in the workspace. This may be some that was declared in a previous problem and NOT the same we want to use now. Exercise 5: You NEED to create a M-file. See page 5 of the protocol. Most the code is given to you, just copy and paste it into a new script file and replace all ?? with the appropriate code. Exercise 6: Make sure you clear your function from the workspace as stated in part (b). I will mark off points for that. Also, make sure you invoke your function in the command window as stated in the question. For part (b), you need to write a function M-file (NOT in the command window) and invoke the function M-file in the command window. please do not plegrise any other student work or copy it, please make sure, because I do not want to get susbended from the school. please.