フィルターのクリア

Unable to plot the two for loops together.

1 回表示 (過去 30 日間)
Nafees
Nafees 2024 年 4 月 27 日
回答済み: Walter Roberson 2024 年 4 月 27 日
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 Center および File Exchange2-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