coding for Resis tors

1 个评论

Original question by Maddison Webb on 2020-10-03 retrieved from Google Cache:
"How to calculate if resistor is in tolerance"
How can I design a function that will provide a logical output if a measured resistor is within a specified manufacturer tolerance?

请先登录,再进行评论。

回答(1 个)

Something like this
function tf = isWithinTolerance(specified_resistance, measured_resistance, tolerance)
lb = specified_resistance*(1-tolerance);
ub = specified_resistance*(1+tolerance);
if (lb<measured_resistance) && (measured_resistance<ub)
tf = true;
else
tf = false
end
end

类别

帮助中心File Exchange 中查找有关 Power and Energy Systems 的更多信息

产品

版本

R2020b

提问:

2020-10-3

评论:

2020-10-3

Community Treasure Hunt

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

Start Hunting!

Translated by