# Thoughts 1

OK, this is not going to be another technical oriented post. We ‘ll have some of those later this summer. This is just some words I want to see written.

After making another commitment of posting regularly, here I am 1 and 1/2 months later.

What happened?

Exams happened. Again. And they will happen again and again.

I have no remorse. I focused on the right thing. What really bothers me is if this is going to continue after graduation. I know a lot of professionals who blogposting every week and tweeting every day and I really want to know their secret (if there is one). Is it because they actually have time or they posses the ability to fit everything to their daily routine?

5/8/14 UPDATE

Fortunately, I passed 7 out of 8 exams and now, hopefully, I will get my degree on time. So, I guess my posting hiatus was worth it.

# IFFT from FFT

One of the most important properties of the FFT (Fast Fourier Transform) algorithm is that we can use it to compute the IFFT. This is a common exercise in DSP (Digital Signal Processing) courses. So, in case you are here just for the code (MATLAB), there you go;


function [x_n]=ivfft(X_k)

x_n=conj(fft(conj(X_k)))/(max(size(X_k)));



The rest of you who are interested in the proof, stick with me.

# Photo application; A simple highpass filter Suppose you have an image (in our case, Superman) and you apply a highpass filter on it. What do you expect to happen? Well, the outlines are going to get enhanced. Let’s find out why and how can we implement such a filter using MATLAB.

# Fair decision, Unfair coin

OK, this is mind-blowing. At least, it was when I first encountered it. Here is the problem; Can you arrive at a fair decision using an unfair coin? Even though it seems absurd, it is possible!

# Buffon’s needle; an extension by Laplace

Happy π day! Celebrating this day, I present to you another way to calculate pi experimentally!

In the previous post, we discussed Buffon’s needle and how it can be used to approximate $\pi$. Laplace studied a very similar problem. Actually, it’s the same concept, just adding something extra. Instead of having a table of parallel strips, we have a table of rectangles.

# Yet another way to calculate pi

Have you ever heard of Buffon’s needle problem? This problem can be used to estimate pi and it goes like this; You have a table with parallel stripes. If I throw a needle on it, what is the probability of intersecting a stripe?

# Approximating integrals Some integrals just can’t get calculated. For example, there is no explicit formula for the integral of the photo. But what if we must know its value or the rocket won’t launch? Well, as every engineer knows, when you can’t be precise you approximate. There are many ways to do that, but we describe here five of them (three in this post and the later two in future posts). The left point Riemann sum, the right point Riemann sum, the midpoint rule, the trapezoid rule and the Simpson rule.

# Calculating pi using a probabilistic method

In probability theory, each discrete random variable X has a Probability Mass Function (PMF) from which we can extract the probability of every possible outcome of X. In addition, there is a function called mean (or expectation) E[X], which give as the outcome we should expect from the random variable X. We exploit this attribute in order to (approximately) calculate pi.

# The prisoner’s dilemma

Three prisoners know that one of them is going to be executed. Agony overcame one of them (prisoner A) and he begged the guard to tell him who of them is the unlucky. After some thinking, the guard decides to reveal someone, other than him, who’s not gonna perish.

He now regrets for asking, because, previously, he had a 2/3 chance to stay intact but now only 1/2. Is his deduction correct?

# Open Circuit Time Constants

Besides Miller’s Theorem, there is another technique we can use to determine the 3db frequency of an amplifier. It is known as Open Circuit Time Constants method and it is just as powerful and useful as Miller’s counterpart.