i am giving the example what i have tried and what result i have got
c= 2 3 4 5 67 58 79 81 91 23 56 78[max_num,max_idx]=max(c,[],2) max_num = 5 81 91 max_idx = 4 4 1 >> [X,Y]=ind2sub(size(c),max_idx) X = 1 1 1 Y = 2 2 1
i am not getting the right ans in first row max element is 5 postion will be (1,4)
Best Answer