How do you graph two equations on the same graph?
4 ビュー (過去 30 日間)
古いコメントを表示
Here is the code that I am using for my two equations I am able to graph them separately but when I graph them together my graph is not correct. I am trying to figure out where the two equations intersect.
plot 1
x = 0:.1:10;
I = (-1/5000)*x+(.0018);
plot(x,I)
plot 2
q=1.6022e-19
C=28.73
T=273+C
k=1.3806e-23
Is=1.0e-12
V= 0:0.01:9
n=1
Vt=(k*T)/q
Id=Is*((exp(V/(n*Vt)))-1)
plot(V,Id)
0 件のコメント
回答 (2 件)
Star Strider
2019 年 10 月 31 日
Using your code:
x = 0:.1:10;
I = (-1/5000)*x+(.0018);
plot(x,I)
hold on % hold on
q=1.6022e-19
C=28.73
T=273+C
k=1.3806e-23
Is=1.0e-12
V= 0:0.01:9
n=1
Vt=(k*T)/q
Id=Is*((exp(V/(n*Vt)))-1)
plot(V,Id)
hold off % hold off
Experiment to get the result you want.
0 件のコメント
Sulaymon Eshkabilov
2019 年 10 月 31 日
Hi,
x = 0:.1:10;
I = (-1/5000)*x+(.0018);
plot(x,I), hold on
%plot 2
q=1.6022e-19;
C=28.73 ;
T=273+C;
k=1.3806e-23 ;
Is=1.0e-12 ;
V= 0:0.01:9;
n=1 ;
Vt=(k*T)/q ;
Id=Is*((exp(V/(n*Vt)))-1) ;
plot(V,Id), legend('x vs. I', 'V vs. Id')
% as two subplots
figure
subplot(211)
plot(x, I)
subplot(212)
plot(V, Id)
Check the values of coefficients/parameters. They seem to be incorrectly typed in.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!