(a) Use for-end loops to create a 5*5 matrix in which the value of each element is the difference of its cubic indices (i.e. the cubic row number subtract the cubic column number of the element). For example, the value of element A(3,4) is 3^3 - 4^3 = -37). Show the script file and the result of the matrix A.
(b) Use for-end loops and if-end to count (1) how many elements in the above matrix A have the value equal to zero, (2) how many elements in the above matrix A have the positive value, and (3) how many elements in the above matrix A have the negative value. Show the script file and the total number of counted elements in above three cases.
MATLAB
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
a)
clc
clear all
close all
format long
A=[];
for i=1:5
for j=1:5
A(i,j)=i^3-j^3;
end
end
disp('Matrix is');
disp(A);

Note: Brother According to HomeworkLib's policy we are only allowed to answer first part if there are many. So, I request you to post other part as separate posts
Kindly revert for any queries
Thanks.
(a) Use for-end loops to create a 5*5 matrix in which the value of each element...