i want to compute Big O complexity for this Matlab code , the challenge i have is how to compute complexity for "sum, size and traspose "of matrix operations
the code is
A=[0 1 1 0 ; 1 0 1 1 ; 1 1 0 1 ; 0 1 1 0];k=full(sum(A))num_edges=sum(k)kkk=full(sum(A,2)');n = size(A,1) % number of nodes
ff=zeros(n,n);gg=zeros(n,n);for i=1:n for j=1:n for q=1:n q; i,j; if(kkk(q)==0) gg(i,j)=A(i,j); else gg(i,j)=gg(i,j)+(((A(q,i)-A(q,j)).^2)/(n)); end end gg(i,j)=gg(i,j).^0.5; endendgg=gg
Thank you,
Best Answer