Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Introduction to Matlab Create a script file with all your answers for the follow

ID: 3865632 • Letter: I

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 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?

Explanation / Answer

Buddy please post 1 question at a time! We are allowed to answer only 1 question at a time. So here is the answer to 1st question

a = [2 4 1; 6 7 2; 3 5 9]
%%
%a =                                                                                                                                                                    
%                                                                                                                                                                       
%   2   4   1                                                                                                                                                           
%   6   7   2                                                                                                                                                           
%   3   5   9
%%
%********************************************************


%assign first row to a vector x1
x1 = a(1,:)
%%
%x1 =                                                                                                                                                                   
%                                                                                                                                                                       
%   2   4   1
%%
%********************************************************

%assign last two rows to an array called y
y = a(2:3,:)
%%
%y =                                                                                                                                                                    
%                                                                                                                                                                       
%   6   7   2                                                                                                                                                           
%   3   5   9                                                                                                                                                           
%%
%********************************************************

%compute sum over the column of a
sum(a)
%%
%ans = 39
%%

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote