Help Me Understand a piece of code.
时间:03-31
整理:3721RD
点击:
In order to know how get the IP3,I find this in ads,but I can't understand the sentence that :
decl vIM = (vIMx >= 1e-304)*vIMx + (vIMx < 1e-304)*1e-304; //v3rd
What's the meaning of 1e-304?
The whole code isthis:
defun ip3_out(vOut,fundFreq,imFreq,zRef,Mix)
{
decl z0 = if (zRef == NULL) then 50.0 else zRef;
decl vFund =abs(mix(vOut,fundFreq,Mix)); //v1st
decl vIMx = abs(mix(vOut,imFreq,Mix));
decl vIM = (vIMx >= 1e-304)*vIMx + (vIMx < 1e-304)*1e-304; //v3rd
decl fund = 10 * log(0.5*real(vFund * conj(vFund)/conj(z0)))+30;
decl third = 10 * log(0.5*real(vIM * conj(vIM)/conj(z0)))+30;
return 0.5*(3*fund-third);
/*
decl vFund3 = pow(vFund,3);
decl toi = 10*log(vFund3/(2*z0*vIM));
return toi + 30;
*/
} //fun - ip3_out()
regards
Yang
decl vIM = (vIMx >= 1e-304)*vIMx + (vIMx < 1e-304)*1e-304; //v3rd
What's the meaning of 1e-304?
The whole code isthis:
defun ip3_out(vOut,fundFreq,imFreq,zRef,Mix)
{
decl z0 = if (zRef == NULL) then 50.0 else zRef;
decl vFund =abs(mix(vOut,fundFreq,Mix)); //v1st
decl vIMx = abs(mix(vOut,imFreq,Mix));
decl vIM = (vIMx >= 1e-304)*vIMx + (vIMx < 1e-304)*1e-304; //v3rd
decl fund = 10 * log(0.5*real(vFund * conj(vFund)/conj(z0)))+30;
decl third = 10 * log(0.5*real(vIM * conj(vIM)/conj(z0)))+30;
return 0.5*(3*fund-third);
/*
decl vFund3 = pow(vFund,3);
decl toi = 10*log(vFund3/(2*z0*vIM));
return toi + 30;
*/
} //fun - ip3_out()
regards
Yang
How to translate this code to mathematical expression.
Regards
Yang
Understand piece code 相关文章: