I keep getting parse error when I try and run this script, why?
显示 更早的评论
%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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Geology 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!