function [max_value, index] = mymax(x) [r,c]=size(x);max_value_row=x(1,1)max_value_col=x(1,1)for i=1:c if x(1,i)>max_value_row max_value_row=x(i,1); end for k=1:r if x(k,1)>max_value_col max_value_col=x(k,1); end endend if max_value_row > max_value_col max_value = max_value_row else max_value = max_value_col index = find(max_value) end
THis is what i have tried so far but the value found is wrong, please help me
Best Answer