Problems with plotting/graph
显示 更早的评论
Hello, I have a question, when I try to graph my point A3 and A4, they don't show up! Anyone have an idea why?
Here's my code
%CodigoReto:Microondas
t = [1.5,3,4.5,6] %Tiempo
x = [26.7134,6.54769,4.25,2.4676388] %Promedios obtenidos
%Valores obtenidos
a = -0.8569;
b = 11.6830;
c = -52.5207;
d = 82.0998;
%Sistema de ecuaciones
A1 = a.*(1.5)^3 + b.*(1.5).^2 + c.*(1.5) + d;
A2 = a.*(3)^3 + b.*(3).^2 + c.*(3) + d;
A3 = a.*(4.5)^3 + b.*(4.5).^2 + c.*(4.5) + d;
A4 = a.*(6)^3 + b.*(6).^2 + c.*(6) + d;
%Graficación
plot (t,x, "*k")
grid
hold on
plot (t,A1, "og") %Tiempo 1.5
plot (t,A2, "+m") %Tiempo 3
plot (t,A3, ":r") %Tiempo 4
plot (t,A4, "-b") %Tiempo 5
xlabel('Tiempo')
ylabel('Dureza')
title('Dureza vs Tiempo: Horno de microondas')
回答(1 个)
Walter Roberson
2021-3-9
编辑:Walter Roberson
2021-3-9
you did a hold on before that, and that would have frozen ylim, so they might be off plot.
ylim auto
类别
在 帮助中心 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!