"the function return value 'self inductance' might be unset"
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
rose wright
il 19 Mar 2018
Commentato: Star Strider
il 20 Mar 2018
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 Commenti
Risposta accettata
Star Strider
il 19 Mar 2018
Perhaps you intend:
Selfinductance = m*n;
or to return ‘L’ as the output.
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Communications Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!