The Gradient Descent part of this code works fine, but can anyone tell me why it's not initialising (or populating) the vector 'J_history'?
Here's the principal code:
data = load('ex1data1.txt'); %2 columns of data - a single x variable and a single y
X = [ones(m, 1), data(:,1)];