Wednesday, 5 February 2014

Find all the roots of a nonlinear funciton with scipy

Let's suppose we would find the roots of a non linear function like:
$$f(x) = \sin(x^2)$$
We can do it simply, with python and scipy, using, for example, the brentq function, that solve such problem with the Brent method, wich is considered the best of rootingfinding routines of scipy.
This method finds the first zero of the given function, in an interval $[a,b]$, where the function has different sign at the bounds.

Tuesday, 26 March 2013

Synchronize Google Drive and Linux with grive

Waiting for the official client of Google Drive for Linux, there are meanwhile two good unofficial solution to sync your files with the file storage service provided by Google. These are:

InSync: a very nice option, that works with Linux, but also with Widows and Macintosh  InSync for Linux is still in beta, and is free until it will be in beta version. After that it will cost a one-time fee of $9.99 for each account that you want activate.

Grive: is a good open source solution, but has some limitations, as no-automatic syncing of files in background, even though is possible make up for this problem running grive automatically, every 10 minute for example, using cron.

Friday, 22 March 2013

Ngspice, RLC resonator

Today, I want to show another Spice example upon AC simulation. The circuit is a parallel RLC resonator, and we are going to figure out some important parameter of the resonators, that are the same of a pass-band filter. These are the resonator frequency, bandwidth and quality factor.

Wednesday, 20 March 2013

How to get a direct download link from Google Drive

More people have a Google account, and also they use Google Drive to keep sync their files with all their devices. Sometimes can be happen to share a file with a friend or someone else and we need a direct download link without redirect other people to Google Drive, like other service over internet. A few steps allow us to avoiding to upload those files another time.

Monday, 18 March 2013

Ngspice, RC filter with variable resistor

Let's do an AC simulation with a RC  filter. Let's assume that we want obtain the graphs of response (Mag-Phase) with three different value of resistor ($1\,k\Omega$, $10\,k\Omega$, $100\,k\Omega$). Also we want measure the cut-off frequency. This is the circuit:

Sunday, 17 March 2013

NgSpice, bridge rectifier with zener diode

Now another spice example, this time we are going to see how to model (in a simple way) a transformer and a zener diode to have a better and stable DC output voltage after the bridge rectifier.

Saturday, 16 March 2013

How to install new font

Install new font in a linux OS is very easy. You need just the true type font that you would install in your computer.
For example if you want install this font downloaded from this website: