Unable to plot the two for loops together.

1 次查看(过去 30 天)
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

采纳的回答

Walter Roberson
Walter Roberson 2024-4-27
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by