Error :First input argument must be a function handle

조회 수: 1 (최근 30일)
raghu k
raghu k 2016년 5월 2일
편집: Walter Roberson 2016년 5월 2일
I am getting "First input argument must be a function handle."
%%Qsh=00;
L=100; W=100; %%Tox = 38.2*10^-9;
Er=16;
u=7000;%% cm2/v.s
e=04;%%%%%%%5Find out!!!!!!!!
Nf=10;%% cm2
R = 280;%% R = Rs/Rd;
hw = 56*10^-3*e;%% NOT SURE !!!!!!!!!!!!
Delta = 66.8*10^-3*e;%% NOT SURE !!!!!!!!!!!!
Pi = 3.14159265;
h=0;%%%%%%%5Find out!!!!!!!!
vf=02;0;%%%%%%%5Find out!!!!!!!!
B = 4;%%% Find OUt!!!!!!!!!!!
Ctop=05;%%%%%%%5Find out!!!!!!!!
w=01;%%5 Find Out !!!!!!!
%%For Loop
Vgsi = 5;
Vdsi=2;
V=Vdsi/2;
b=2;
%% Equation 3
s = sign(Ctop*(Vgsi-V) +e*Nf)
%% Equation 2
Vch = (s-Ctop+sqrt(Ctop^2+4*B*abs(Ctop*(Vgsi-V))+e*Nf))/(2*B)
%% Equation 1
Qsh = e*((-B/e)*abs(Vch)*Vch+Nf)
%% Equation 4
Qnetav = b*s*((-Ctop^2+sqrt(Ctop^2+4*B*abs(Ctop*(Vgsi-Vdsi/2)+e*Nf))/(2*B))^2)
%% Equation 5 for Npuddle
Npuddle = Delta^2/(pi*h^2*vf^2);
%% Equation 5 for Vsat
Vsatav = L+abs(Vdsi)*u*(pi*((abs(Qnetav)/e)+Npuddle))^0.5/w;
%% Equation 5
Id = u*W*integral(abs(Qnetav)+e*Npuddle,0,Vdsi)/(L+u*abs(integral((1/Vsatav),0,Vdsi)));
% Plot(Vgsi,Id)
Please help.
Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2016년 5월 2일
편집: Walter Roberson 2016년 5월 2일
Id = u*W*integral(@(Qnetav) abs(Qnetav)+e*Npuddle,0,Vdsi) / (L+u*abs(integral(@(Vsatav) (1/Vsatav),0,Vdsi)));
Assuming, that is, that you want to integrate over Qnetav and Vsatav and that e and Npuddle are already defined.
However, remember integral(1/x,x=a..b) is ln(b)-ln(a) and when a = 0 the result is infinite, so your second integral is infinite if you are integrating over Vsatav . If you are integrating over some other variable then you would be integrating a constant and the result would be Vdsi/Vsatav with no need to integrate. Either way, there is no point in doing the second integral -- it is either infinite or a constant.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by