# Creating Bandpass Bessel Filter with MATLAB

March 04, 2014

Bessel filters are incredibly useful in numerical analysis, especially for acoustic-type waveforms. This is because analog Bessel filters are characterized by almost constant group delay over any frequency band, and this means that the shape of waves does not change when passed through such a filter.

Well, MATLAB provides some of the building blocks required to create a bandpass analog filter, but does not actually combine the pieces to make a usable filter function.

I created a function for my own research (sourced from pieces I found elsewhere, but it’s been too long—I don’t remember where I found each piece, sorry!), and can be found at my MATLAB repository, specifically, here.

Here’s the documentation that I included with the function:

``````besselfilter. Function to implement a bandpass Bessel Filter.

[filtData, b, a] = besselfilter(order,low,high,sampling,data)

Inputs:

- order:      Number of poles in the filter. Scalar numeric value.
Eg.: 4
- low:        Lower frequency bound (Hz). Scalar numeric value.
Eg.: 50000 (= 50kHz)
- high:       Upper frequency bound (Hz). Scalar numeric value.
Eg.: 1000000 (= 1MHz)
- sampling:   Sampling frequency (Hz). Scalar numeric value.
Eg.: 25000000 (= 25MHz)
- data:       Input data. Numeric vector.
Eg.: data vector of size (n x 1)

Output:

- filtData:   Output filtered data. Numeric vector.
Eg.: data vector of size (n x 1)
- b, a:       Transfer function values for the filter. Scalar numeric.
``````

# Apple’s Curse

February 28, 2014

Last Fall, Apple included a fingerprint sensor in its latest iPhone, and called the technology ‘TouchID’. A few days ago, Samsung did the same, including its own fingerprint sensing technology in its latest Galaxy S5 phone.

The blogosphere has been aflutter about one small difference between the two launches: when Apple launched their technology, there was a huge uproar about the implications of using fingerprints as an authentication tool. As everyone has been pointing out, even a US Senator, Al Franken, issued a public email (PDF) addressed to Apple asking for clarifications and explanations regarding the technology and its implications. In contrast, Samsung’s new technology has received no such attention.

Apple: Think Different.

Here are my two cents on the reasons:

# The secret to happy work

December 16, 2013

Watched this great TED talk with my roommates yesterday; I think you should go watch this too:

Happy working! :)

# MATLAB repository

December 15, 2013

I’ve been using MATLAB for quite a few years now, using it both for my own research as well for work at VTTI. Well, I decided to share some of the code that I’ve been writing, which may come in handy to others in the same field. I’ve long appreciated the help I’ve received from the larger MATLAB community, and I thought I should start contributing as well. :)

I’ve been using bitbucket as my code repository. I know, GitHub seems to be more popular in the tech and programming community, but by coincidence I happened to learn Mercurial (Hg) first, and Mercurial it has been for me since. Bitbucket supports both Hg and Git, so you may use either based on your preference.

To be sure, these are and will be scripts that I can share, and in some cases may be snippets of code that I think may be useful in implementing certain logic scenarios. They will almost certainly not be pathbreaking new pieces of programming. :) I’ll be glad if you find them useful in any way.

# Music: lyrics for Bnaador, from Fossils 4

November 19, 2013

More music lyrics… but this time with some reservations. There could some errors in the lyrics (this is true for everything else that I write, of course, but more so for this one). That being said, I’m quite certain the vast majority of the lines are accurate. Please let me know if you find errors, though. :)

This is Bnaador, from Fossils 4.

As always, you can listen to the album on Saavn or Dhingana.

# Music: lyrics for Hajar Bichhana, from Fossils 4

November 15, 2013

Time for more lyrics. :) Here’s Hajar Bichhana, from Fossils 4.

Listen to the album on Saavn or Dhingana.

# Music: lyrics for Mohakaash, from Fossils 4

November 10, 2013

Continuing with today’s music theme, here’re the lyrics for another number from Fossils 4, the latest album from the bangla band Fossils.

Listen to the album on Saavn or Dhingana.

# Music: lyrics for Khnoro Amar Fossil, from Fossils 4

November 10, 2013

The Bangla Band Fossils came out with their new album Fossils 4 recently, and I’ve been listening to it frequently. Unfortunately, I can’t seem to find the lyrics of some of the songs anywhere online, so I transcribed some of them myself. Here’s one. :)

Listen to the album on Saavn or Dhingana. (Fossils band members, and Rupam Islam in particular—why not launch the album on iTunes? Makes obtaining music easier for people away from the country.)

# Matlab: find a string within a cell array of strings

October 14, 2013

I just wanted to jot down a few points about Matlab programming. Specifically, this is about finding a string within another cell array of strings, where the thing I’m really interested in is the index of the cell array where the reference string occurs. For example, if my reference string is `'Gamma'`, and my cell array is `{'Alpha','Beta','Gamma','Delta'}`, then the result of the code should be `3`.

# More on the Naked Mole Rat

October 12, 2013

I’ve written about the naked mole rat before, about how it seems to be immune to acid.

Well, it turns out it has more tricks up its genetic sleeve.

To compare how the naked mole rat made their proteins, they inserted an engineered gene in the naked mole rat as well as in mice, which allowed them to compare the rate of errors in making proteins. And here’s what they found:

[The naked mole rat] built the engineered protein far more accurately, in other words. Naked mole rats, the scientists found, made anywhere from four to ten times fewer mistakes. Yet the naked mole rats can make their proteins as quickly as the sloppier mice.

This seems to be a fascinating creature the more we study it!

I wonder, though, why other species did not pick up this brilliant piece of evolution. Are there side effects to this that are detrimental, overall, to other species but which don’t affect the naked mole rat? As I said in my earlier post, intriguing.

(Original source, quoted by National Geographic: Jorge Azpurua et al.“Naked mole-rat has increased translational fidelity compared with the mouse, as well as a unique 28S ribosomal RNA cleavage.” PNAS 2013