Determining Maximum Values per Row in a Matrix
Hi,
I would like to write a program that determines the maximum values per row in a i by j matrix.
I have written the program below, but I am struggling to get it to work automatically, without having to manually add in the number of columns in the max() function on line 3 - please see attached. I thought the second example in the attachment maxrows2(VEC) was the same as maxrows(VEC); however it seems not....
I had an idea to try and split the matrix into column vectors and do it that way, as per the link below
However I am also having trouble writing a program to automatically split an i by j matrix into j columns!
Any help would be greatly appreciated.
Kind regards


