Skip to content

Instantly share code, notes, and snippets.

@c1b3rh4ck
Last active December 14, 2015 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c1b3rh4ck/5030059 to your computer and use it in GitHub Desktop.
Save c1b3rh4ck/5030059 to your computer and use it in GitHub Desktop.
Calculator of Standard EIA Decade Resistor Values Table
%Standard EIA Decade Resistor Values Table
%R=d*10^(i/n)
%feedback:hfjimenez@utp.edu.co
%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
@c1b3rh4ck
Copy link
Author

you can send all the data to a file using fopen('namefile.txt','W');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment