In: Computer Science
IN MATLAB,
Create a 8x8 magic matrix. Then use MATLAB built in function, sum, to calculate the sum of each column. Use subscript notation to find the 6th element and the last element of each magic square. Find the maximum of all the elements in each magic square.
MATLAB code for magic matrix:---
M=magic(8)
sum_of_cols=sum(M)
sixth_element=M(1,6)
last_elemnt=M(end)
max_element_in_each_column=max(M)
%maximum of columns
maximum_of_whole_matrix=max(max_element_in_each_column)
%maximum of whole matrix
k