I have attached my problem please write its matlab command.

f = @(delv)(sqrt(2.*q.*Nsub./Csi.*(delv+vt.*(ni./Nsub).^2.*(exp(delv./vt)-1))+(vt.*(exp(-delv./vt)-1))));
delv=Vs1-Vbef+A-R-S-B(1+(Cox./Csi))-(-(q.*Np.*tsi./Cox)+(Csi.*f./Cox)).*(1+Cox./Csi);

回答(1 个)

f = @(delv) str2sym('(sqrt(2.*q.*Nsub./Csi.*(delv+vt.*(ni./Nsub).^2.*(exp(delv./vt)-1))+(vt.*(exp(-delv./vt)-1))))');
delv=@(f) str2sym('Vs1-Vbef+A-R-S-B(1+(Cox./Csi))-(-(q.*Np.*tsi./Cox)+(Csi.*f./Cox)).*(1+Cox./Csi)');
f(delv) %f is a function of delv
delv(f) %delv is a function of f

6 个评论

by the way what do you want to from the above equations there are no datas for the variables ,if the above doesn't work upload your file by clicking the paper clip button {}.
The other variables are defined in my program. I was facing problem in writing these 2 lines only. I was using some iteration to find out the value of 'f' which will be suitable to put in 'delv'. As you have answered it, I will try your code now.
I have attached my code. Now my problem is to get a value return after solving this iteration problem . Don't worry about the other variables, they are well defined in my program.
{ f = @(delv)(sqrt(2.*q.*Nsub./Csi.*(delv+vt.*(ni./Nsub).^2.*(exp(delv./vt)-1))+(vt.*(exp(-delv./vt)-1))))
format long
eps_abs = 1e-15
eps_step = 1e-15
a=0
v=15e-9
while ((v - a) >= eps_step || ( abs( f(a) ) >= eps_abs && abs( f(v) ) >= eps_abs ) )
s = (a + v)/2
if ( f(s) == eps_abs )
break
elseif ( (f(a)*f(s)) < 0 )
v = s
else
a = s
end
end
d=a
delv=Vs1-Vbef+A-R-S-B(1+(Cox./Csi))-(-(q.*Np.*tsi./Cox)+(Csi.*d./Cox)).*(1+Cox./Csi);
}
"Don't worry about the other variables, they are well defined in my program."
If you want a proper help provide all the necessary details
My program is too long and it has many variables defined into the other. So the main problem is I am unable to get the value returned after iteration. Can you help in iteration portion particularly?
which value do you want to return ? attach your script file

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Programming 的更多信息

标签

尚未输入任何标签。

提问:

2018-11-9

编辑:

2018-11-11

Community Treasure Hunt

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

Start Hunting!

Translated by