I keep getting parse error when I try and run this script, why?
Show older comments
%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.
1 Comment
Ethan Postans
on 3 Dec 2018
Accepted Answer
More Answers (0)
Categories
Find more on Labels and Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!