Differentiation for relative sensitivity calculation
Show older comments
I need to differentiate xN with respect to ln (Nd) and plot the result for Nd varying between 10^14/ cm^3 to 10^18/cm^3. Can any one please help. Heartfelt thanks...
K=1.38e-23;
T=300;
q=1.6e-19;
esi=11.8;
e0=8.854e-14;
Na=1e19;
ni=1.1e10;
syms Nd
v=(K*T)/q;
x=((Na.*Nd)./(ni^2));
Vbi=(v.*log(x));
xN=sqrt((2*esi*e0/q)*((Na*Vbi)./(Nd.*(Na+Nd))));
Answers (1)
Stephan
on 21 Oct 2020
D_xN = diff(xN,Nd)
4 Comments
SWASTIK SAHOO
on 21 Oct 2020
Run the complete code:
K=1.38e-23;
T=300;
q=1.6e-19;
esi=11.8;
e0=8.854e-14;
Na=1e19;
ni=1.1e10;
syms Nd
v=(K*T)/q;
x=((Na.*Nd)./(ni^2));
Vbi=(v.*log(x));
xN=sqrt((2*esi*e0/q)*((Na*Vbi)./(Nd.*(Na+Nd))));
D_xN = diff(xN,Nd)
To plot:
fplot(D_xN,[-1e4 1e7])
Stephan
on 21 Oct 2020
Also you can use:
>> pretty(xN)
/ / 10 Nd \ \
| log| ----- | |
| \ 121 / |
sqrt(6007439) sqrt| ------------------------------ | 750000000
\ Nd (Nd + 10000000000000000000) /
and for the derivative:
>> pretty(D_xN)
/ / 10 Nd \ / 10 Nd \ \
| log| ----- | log| ----- | |
| \ 121 / 1 \ 121 / |
sqrt(6007439) | ------------------------------- - ------------------------------- + ------------------------------- | 375000000
| 2 2 2 |
\ Nd (Nd + 10000000000000000000) Nd (Nd + 10000000000000000000) Nd (Nd + 10000000000000000000) /
- -------------------------------------------------------------------------------------------------------------------------------
/ / 10 Nd \ \
| log| ----- | |
| \ 121 / |
sqrt| ------------------------------ |
\ Nd (Nd + 10000000000000000000) /
SWASTIK SAHOO
on 21 Oct 2020
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!