You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

plotData.m 951 B

8 years ago
1234567891011121314151617181920212223242526272829
  1. function plotData(x, y)
  2. %PLOTDATA Plots the data points x and y into a new figure
  3. % PLOTDATA(x,y) plots the data points and gives the figure axes labels of
  4. % population and profit.
  5. % ====================== YOUR CODE HERE ======================
  6. % Instructions: Plot the training data into a figure using the
  7. % "figure" and "plot" commands. Set the axes labels using
  8. % the "xlabel" and "ylabel" commands. Assume the
  9. % population and revenue data have been passed in
  10. % as the x and y arguments of this function.
  11. %
  12. % Hint: You can use the 'rx' option with plot to have the markers
  13. % appear as red crosses. Furthermore, you can make the
  14. % markers larger by using plot(..., 'rx', 'MarkerSize', 10);
  15. figure; % open a new figure window
  16. plot(x, y, 'rx', 'MarkerSize', 10);
  17. xlabel('xlabel');
  18. ylabel('ylabel');
  19. % ============================================================
  20. end

机器学习

Contributors (1)