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

Réponses (1)

madhan ravi
madhan ravi le 9 Nov 2018
Modifié(e) : madhan ravi le 9 Nov 2018
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 commentaires

madhan ravi
madhan ravi le 9 Nov 2018
Modifié(e) : madhan ravi le 9 Nov 2018
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 le 9 Nov 2018
Modifié(e) : madhan ravi le 9 Nov 2018
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 le 11 Nov 2018
Modifié(e) : A GARG le 11 Nov 2018
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 le 11 Nov 2018
Modifié(e) : madhan ravi le 11 Nov 2018
which value do you want to return ? attach your script file

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Tags

Aucun tag saisi pour le moment.

Question posée :

le 9 Nov 2018

Modifié(e) :

le 11 Nov 2018

Community Treasure Hunt

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

Start Hunting!

Translated by