I keep getting parse error when I try and run this script, why?
Afficher commentaires plus anciens
%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 commentaire
Ethan Postans
le 3 Déc 2018
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Geology dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!