Problems with plotting/graph

2 visualizaciones (últimos 30 días)
Alejandra Caballero
Alejandra Caballero el 9 de Mzo. de 2021
Editada: Walter Roberson el 9 de Mzo. de 2021
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')

Respuestas (1)

Walter Roberson
Walter Roberson el 9 de Mzo. de 2021
Editada: Walter Roberson el 9 de Mzo. de 2021
you did a hold on before that, and that would have frozen ylim, so they might be off plot.
ylim auto

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by