%Assignment 4 for SES 619 by Ethan Postans
%Fall 2018, Dr. Smith
load data_set1.dat
Column1 – height(cm)
Column2 – mass(kg)
Column3 – body fat(kg)
height = data_set1(:,1);
mass = data_set1(:,2);
fat = data_set1(:,3);
figure(1) %tells matlab to create figure 1
clf reset; %clears and resets figure 1
plot(height, mass, '.'); %plots points
xlabel('subject height (cm)'); %adds label to x-axis
ylabel('subject mass (kg)'); %adds label to y axis
title('Height vs Mass'); %adds title
figure(2) %tells matlab to create figure 2
clf reset; %clears and resets figure 2
plot(height,fat,'.'); %plots points
xlabel('Subject height (cm)'); %adds label to x-axis
ylabel('Subject body fat (kg)'); %adds label to y-axis
title('Height vs Body Fat'); %adds title
The Column3 line is where Matlab is telling me that I have a parse error.
Best Answer