I was trying to execute my Octave scripts to recognize digits using a Neural Network. Octave did not work after I upgraded to Yosemite. Now it works after these steps. It may look simple but this wasted several hours.

This is one of the simpler code tasks I worked on. I use ‘R’ but since this is Octave my first attempt wasn’t generic. The for loop assumes that there are 2 columns in the matrix shown below. There is a way to modify it to be more generic but this an example to show my Octave skills !!

I have a matrix with 2 columns and a vector which has repeating sets of the numbers 3,2 and 1. The task is to calculate the mean of all values in each column of the matrix rows that are grouped by the numbers 3, 2 and 1. So I decided to add the vector as the 3rd column of the matrix.