coding for Resis tors
显示 更早的评论
1 个评论
Stephen23
2020-10-3
"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 个)
Ameer Hamza
2020-10-3
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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!