code:
a=[0.0022; 0.0922; 0.0146; 0.2549];[m,n]=size(a);differences = bsxfun(@minus,reshape(a,m,1,n),reshape(a,1,m,n));v = nonzeros(differences');newmat = reshape(v,3,4)';val = max(newmat');V=val';
the above code executes and gives me the result.
but when i run the code below
a=[0.0022 0.0021; 0.0922 0.0938; 0.0146 0.0143; 0.2549 0.2509];[m,n]=size(a);differences = bsxfun(@minus,reshape(a,m,1,n),reshape(a,1,m,n))v = nonzeros(differences');newmat = reshape(v,3,4)'val = max(newmat')V=val'
I am error stating Error using '
Transpose on ND array is not defined. Use PERMUTE instead.
Error in (line 20)
v = nonzeros(differences');
Could anyone please help me on it.
Best Answer