You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
879 B
Matlab
27 lines
879 B
Matlab
10 years ago
|
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.
|
||
|
|
||
|
% ====================== 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
|