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

MATLAB Load the workspace \"Test1.mat\" (again, variables provided in this file

ID: 3585410 • Letter: M

Question

MATLAB

Load the workspace "Test1.mat" (again, variables provided in this file are indicated in red bold below - feel free to explore them in the workspace prior to using them).

Append the vector vec1 (4 elements) to the final column of the matrix mat1(4x4) and store the result as variable mat2. Do not change mat1.

Find the cosine of the second and fourth elements of vec2 and divide these results, element by element, by the natural logarithm of the middle two elements of vec1 in a single statement. Set this resulting vector answer to variable ans1.

Explanation / Answer

Not able to access or download Test1.mat

load('Test1.mat');

mat2=[mat1 vec1];

save('Test1.mat')

b)

second=cos(vec2(2));

fourth=cos(vec2(4));

divide=second./fourth;