Skip to content

Instantly share code, notes, and snippets.

@detik19
Last active March 20, 2016 10:58
Show Gist options
  • Save detik19/a386b050d77cfccb3e32 to your computer and use it in GitHub Desktop.
Save detik19/a386b050d77cfccb3e32 to your computer and use it in GitHub Desktop.
data = load('ex1data1.txt');
X = data(:, 1); y = data(:, 2);
m = length(y);
figure;
plot(x, y, 'rx', 'MarkerSize', 10);
ylabel('Harga hunian');
xlabel('luas tanah');
X = [ones(m, 1), data(:,1)];
theta = zeros(2, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment