Why do I receive a subplot error?
Afficher commentaires plus anciens
figure(1)
hxl= subplot(scatter(height,leg));
lsline(hxl);
polyfit(height,leg,1);
title('Height v. Leg Length');
xlabel('Height (cm)');
ylabel('Leg Length (cm)');
%figure(2)
hxf= subplot(scatter(height,foot));
lsline(hxf);
polyfit(height,foot,1);
title('Height v. Foot Length');
xlabel('Height (cm)');
ylabel('Foot Length (cm)');
%figure(3)
hxs= subplot(scatter(height,speed));
lsline(hxs);
polyfit(height,speed,1);
title('Height v. Speed');
xlabel('Height (cm)');
ylabel('Speed (m/s)');
%figure(4)
lxs= subplot(scatter(leg,strl));
lsline(lxs);
polyfit(leg,strl,1);
title('Leg Length v. Stride Length');
xlabel('Leg Length (cm)');
ylabel('Stride Length (distance/stride)');
% Find the R^2 and p-value for each linear fit.
% Use command fitlm(x,y)
fitlm(height,leg)
fitlm(height,foot)
fitlm(height,speed)
fitlm(leg,strl)
>> WalkingSpeed
Error using subplot (line 197)
Requires valid axes handle for input.
Error in WalkingSpeed (line 49)
subplot(scatter(height,leg));
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Subplots 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!