So, I wrote this little MATLAB script to help you choose the optimal pair of 1% resistors for a two-resistor divider. You can download it here.
For you open source fans out there, it should also run in GNU Octave. If not, just let me know.
In the past couple of months, I’ve found myself needing to create timelines and gantt charts that span multiple centuries. Ancient dates aren’t supported by Excel or OpenOffice, so you have to get a little creative. If you only need years, and not month and days, the solution is pretty straightforward:
"AD" #0;#0 "BC"
The solution to entering dates like April 1, 1692 is a little uglier, since you have to create an extra column, but whatever:
Have you ever wondered what the formula for that thing that looks like a sine wave, but is really just half circles? Well, take a look below for the Matlab code of how to generate and plot such a signal with a particular frequency. If you need help translating to another programming or graphing language, just let me know.
Also, a handy feature of this code is the ability to only plot the first N periods. Take a look! 🙂
Fs = 100; % Sampling frequency T = 1/Fs; L = 1000; % Number of samples t = (0:L-1)*T; % Time vector fs = 1; % Frequency of signal. A = 1; % Amplitude of signal. % Half-circle waveform: r = 1/(fs*4); y = (A/r)*1)2*(mod(t,r*4) == mod(t,2*r - 1).*sqrt(r^2 - (mod(t,2*r)-r).^2)); % Regular sine waveform: y2 = A*sin(2*pi*fs*t); % Plot the waveforms. numPeriods = 3; tEnd = round(numPeriods/(T*fs)); plot(t(1:tEnd),y(1:tEnd),t(1:tEnd),y2(1:tEnd))
Notes [ + ]
|1.||↑||2*(mod(t,r*4) == mod(t,2*r|
If you’ve ever had a Windows process or application you were trying to document using screenshots, chances are that you’ve used the Alt+Print Screen shortcut to capture a single window to the clipboard. If you have Windows running on a virtual environment like VMWare or VirtualBox under Mac OSX, you can still use the print screen key. Here’s how:
I think I’m going to attempt to make more use of this blog as somewhere to record the cool things I learn. I’m sure at least some of you have had this problem:
The solution to this problem was found here. In short, you print to PDF using Acrobat. Then, in the print options specify to “Tile Large Pages”. Look at the preview image, and adjust the margins and scaling so the split happens in the appropriate place. Hit print, and save as another file. Then, run OCR on that new file. The pages can then be deskewed separately. PRETTY NIFTY!