VAN DER PAUW equation

19 ビュー (過去 30 日間)
Tahani Almutairi
Tahani Almutairi 2019 年 5 月 17 日
回答済み: John D'Errico 2019 年 5 月 22 日
I am a new user in MATALAB
how I can solve vander pauw equation drectily to get the resistance R
exp(-pi*100/R)+exp(-pi*79/R)=1

回答 (2 件)

Star Strider
Star Strider 2019 年 5 月 17 日
Convert your equation to an anonymous funciton, then use the fzero function:
vdp = @(R) exp(-pi*100./R)+exp(-pi*79./R)-1;
R = fzero(vdp, 1E+3)
producing:
R =
403.7041
I plotted this, and there appears tobe only one zero-crossing.
  5 件のコメント
Tahani Almutairi
Tahani Almutairi 2019 年 5 月 22 日
THANKS for all replly
If I replaced the 100 and 70 By another values say 13750 and 13820
Is the steps above still valid for example
vdp = @(R) exp(-pi*13750./R)+exp(-pi*13820./R)-1;
R = fzero(vdp, 1E+3)
what is the role of the second step ?
Star Strider
Star Strider 2019 年 5 月 22 日
Yes, theoretically. Those much larger values will overflow the exp function, leading to meaningless results.
The ‘second step’ is the fzero call to calculate the root.
Try plotting your function.
Experiment to get the result you want.

サインインしてコメントする。


John D'Errico
John D'Errico 2019 年 5 月 22 日
First, see that no symbolic solution will exist. If we have the general problem:
exp(-A*x) + exp(-B*x) == 1
then by the transformation u = -B*x, this reduces to
exp(C*u) + exp(u) == 1
for C = A/B.
With one more transformation, v = exp(u), thhis reduces to the quasi-polynomial form:
v^C + V == 1
where C is not an integer. Clearly that has no analytical colution for v, and therefore not for x either.
Of course, solve finds nothing, as expected.
syms x A B C
solve(exp(A*x) + exp(B*x) == 1,x)
Warning: Unable to find explicit solution. For options, see help.
> In solve (line 317)
ans =
Empty sym: 0-by-1
solve(exp(C*x) + exp(x) == 1,x)
Warning: Unable to find explicit solution. For options, see help.
> In solve (line 317)
ans =
Empty sym: 0-by-1
That leaves you with a numerical solution as the main option.
syms R
vpasolve(exp(-pi*100/R)+exp(-pi*79/R)==1)
ans =
403.70410829770738335461645229766
Or of course, you could use fzero or fsolve.
fun = @(R ) exp(-pi*100 ./R) + exp(-pi*79 ./R) - 1;
fzero(fun,500)
ans =
403.704108297707
If you do, then you need to choose a viable starting value.
In your followup comment, you asked if you change the constants to much larger values. Here, one of the variations I showed will make it much easier. That is, if we transform the problem into the form:
exp(C*u) + exp(u) == 1
where
u = -B/R
then
A = -pi*13750;
B = -pi*13820;
C = A/B
C =
0.99493487698987
Now just solve it as:
Rsolve = @(A,B) B/fzero(@(u) exp(A/B*u) + exp(u) - 1,1);
Rsolve(-pi*100,-pi*79)
ans =
403.704108297707
Rsolve(-pi*13750,-pi*13820)
ans =
62478.4449664911
The nice thing is now, 1 will generally always be a decent starting value in the call to fzero. As a test, we have:
A = -pi*13750;
B = -pi*13820;
R0 = Rsolve(-pi*13750,-pi*13820)
R0 =
62478.4449664911
exp(A/R0) + exp(B/R0)
ans =
1

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by