Question: Introduction to Matlab Create a script file with all your answers for the following exercises separated by comments and upload it on D2L The descriptions
Introduction to Matlab Create a script file with all your answers for the following exercises separated by comments and upload it on D2L The descriptions are complete and for some problems the nature of the input/output and display options is left to you.You 1. Given the array A=[241 ; 6 72,359], provide the commands needed to: I. assign the first row of A to a vector called x1 Il. assign the last 2 rows of A to an array called y Ill. compute the sum over the columns of A 2. Give the following commands to create a matrix called F e randn'seed ,123456789) Note: MATLAB has functions min, max, mean(average), median and sum built-in The questions that follow ask you to write your own code for these functions, as if they were not built-in. The idea here is for you to get some programming experience with MATLAB L. Compute the minimum and maximum value of each column and assign the results to the elements of a vector called min value and max_value Il. Compute the mean of each column and assign the results to the elements of a IIl. Compute the standard deviation of each column and assign the results to the with X the current element, M the mean and n the number respectively vector called avg. elements of a vector called s of elements In each case, you can check your results with the built-in functions 3. Compute the value of pi using the following series: How many terms are needed to obtain an accuracy of 1e-122 How accurate is the sum of 100 terms of this series
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
