필터 지우기
필터 지우기

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 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