Borrar filtros
Borrar filtros

Unable to plot the two for loops together.

1 visualización (últimos 30 días)
Nafees
Nafees el 27 de Abr. de 2024
Respondida: Walter Roberson el 27 de Abr. de 2024
clc
c = 1;
for w = 0:0.001:1.5
J(c)= ((4*10^-7) * (exp(( (1.66*10^-19 * w) / (1.5*(1.38*10^-23)*298.15)-1))))-40;
w_copy(c) = w;
c = c+1;
end
d = 1;
for y = 0:0.001:1.5
T(d)= ((4*10^-7) * (exp(( (1.66*10^-19 * y) / (1.5*(1.38*10^-23)*298.15)-1))));
a_copy(d) = y;
d = d+1;
end
plot(w_copy,J);
hold on
plot(a_copy,T);
hold on
grid minor
hold off

Respuesta aceptada

Walter Roberson
Walter Roberson el 27 de Abr. de 2024
The two functions differ by 40 at every location.
40 is much less than the value of the function, which goes up to 5 x 10^10. A difference of 40 in 5E10 is insignificant for plotting purposes.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by