How to plot multiple functions on same figure using fplot?
Mostrar comentarios más antiguos
stress = [0;0.0464;0.1940;0.4962;0.5040;0.5566;0.6040;0.6260;0.6240;0.6100;0.5880;0.5720];
strain = [0;0.2220;0.3600;0.4980;0.5040;0.8820;2.6640;4.4400;5.9100;6.7380;7.1460;7.2900];
coeffL = polyfit(strain,stress,1);
mL = coeffL(1);
bL =coeffL(2);
yL = @(x) mL*x+bL;
coeffP = polyfit(log10(strain),log10(stress),1);
mP = coeffP(1);
bP = 10.^coeffP(2);
yP = @(x) bP.*(x.^mP);
coeffE = polyfit(strain,log(stress),1);
mE = coeffE(1);
bE = exp(coeffE(2));
yE = @(x) bE.*exp(mE.*x);
figure(2)
hold on
fplot(yL,[0,4]);
fplot(yP,[4,8]);
fplot(yE,[8,12]);
For some reason when I run the code it only graphs the linear portion
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Contour Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


