Updated 16 Apr 2016
Given a % error tolerance, optimised solution for an equivalent resistance is provided using 2 or 3 series or parallel resistors. Recommend using only 2 resistor combinations, answer arises in <0.4 seconds. Three resistors resistor combination solutions take approximately 7 minutes, and it is advised these solutions are for emergency use only. Full instructions available with example code by entering 'help resist'.
Scott Williams (2023). resist(desired_value,p_c_error,displayall_012,ThreeResistors01) (https://www.mathworks.com/matlabcentral/fileexchange/56589-resist-desired_value-p_c_error-displayall_012-threeresistors01), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired: Round to Electronic Component Values
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.