Last active
October 21, 2015 15:57
-
-
Save ColeMurray/1d7bad6ec420dae38825 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function plotData(x, y) | |
%PLOTDATA Plots the data points x and y into a new figure | |
% PLOTDATA(x,y) plots the data points and gives the figure axes labels of | |
% population and profit. | |
plot(x,y,'rx', 'MarkerSize', 10); | |
ylabel('Profit in $10,000s'); | |
xlabel('Population of city in 10,000s'); | |
% ====================== YOUR CODE HERE ====================== | |
% Instructions: Plot the training data into a figure using the | |
% "figure" and "plot" commands. Set the axes labels using | |
% the "xlabel" and "ylabel" commands. Assume the | |
% population and revenue data have been passed in | |
% as the x and y arguments of this function. | |
% | |
% Hint: You can use the 'rx' option with plot to have the markers | |
% appear as red crosses. Furthermore, you can make the | |
% markers larger by using plot(..., 'rx', 'MarkerSize', 10); | |
figure; % open a new figure window | |
% ============================================================ | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment