I have to verify that my matrix code is correct by checking that for a 5x5 matrix, SS=I_5. How do I do that? This is the code I have for returning a matrix S of any size.
function S = S_Matrix(m)
S=zeros(m)
for ii= lim ;
for jj= lim ;
S(ii,jj)= sqrt(2/m)*sin*((pi/m)*(ii-(1/2))*(jj-(1/2)));
end
end
end
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/659438-how-to-call-a-matlab-function#comment_1155703
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/659438-how-to-call-a-matlab-function#comment_1155703
Sign in to comment.