"the function return value 'self inductance' might be unset"
11 次查看(过去 30 天)
显示 更早的评论
hye, this is my codes,
function [ Selfinductance ] = Inductance(D_out,D_in,p)
u= pi*4*10.^-7;
y= 4*pi*p.^2;
X= (u*D_out.^3)/y;
a = D_in/ D_out;
B = (1 - a);
b = (1 + a);
m = X* (1-a.^2)*(1-a);
n = log(b/B) + (0.2235*(B/b))+ 0.726;
L = m*n
end
this codes is working perfectly but i got warning "the function return value 'self inductance' might be unset" and when i tried to call this function in another function,
function [ qfactor] = qfactor(D_out,D_in,p)
f= 0:8;
for i = 0:8
L= Inductance(D_out,D_in,p);
Q(i+1)= f(i+1)*L
end
end
I got this,
L =
4.5579e-06
Error in Inductance (line 3)
u= pi*4*10.^-7;
Output argument "Selfinductance" (and maybe others) not assigned during call to "C:\Users\.......
why this happened and how can i fix this?
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Communications Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!