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

madhan ravi
madhan ravi 2018년 11월 9일
편집: madhan ravi 2018년 11월 9일
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

madhan ravi
madhan ravi 2018년 11월 9일
편집: madhan ravi 2018년 11월 9일
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 {}.
A GARG
A GARG 2018년 11월 9일
편집: madhan ravi 2018년 11월 9일
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.
A GARG
A GARG 2018년 11월 11일
편집: A GARG 2018년 11월 11일
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?
madhan ravi
madhan ravi 2018년 11월 11일
편집: madhan ravi 2018년 11월 11일
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