Last active
December 14, 2015 04:39
-
-
Save c1b3rh4ck/5030059 to your computer and use it in GitHub Desktop.
Calculator of Standard EIA Decade Resistor Values Table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%Standard EIA Decade Resistor Values Table | |
%R=d*10^(i/n) | |
%feedback:[email protected] | |
%http://www.logwell.com/tech/components/resistor_values.html | |
clc | |
clear all; | |
clear ans; | |
d=input('What decade are you trying to obtain ?');%enter de multi factor 1,10,100,1000 | |
i=input('Enter the finite number !')%,1,2,3,4,...n-1 | |
n=input('Enter the tolerance');%3,6,12,24,48,96,192 | |
for m=1:i | |
r=(d*10^(m/n)); | |
disp(roundn(r,-2));%we use roundn() in order to reduce decimal (round method) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can send all the data to a file using fopen('namefile.txt','W');