## Simple MATLAB code to show the zero-correlation between sample of white Gaussian noise

Let be a Nx1 vector that contains pseudorandom samples drawn from standard normal distribution. This represents N samples taken from a standard normal distribution at time ‘t’.

The correlation of the sequence is given by E[xH]

This means, we need to compute the matrix xH M (M is a very large number) times, sum up all the matrices, and divide the resultant matrix by M. We can see that as M tends to infinity, we get a diagonal matrix as output. If the variance of the noise distribution is 1, then we get an identity matrix.

Z=10;
N=1000000
Y=zeros(Z,Z);
for i=0:N-1
x=randn(Z,1);
X=x*x';
Y=Y+X;
end
Y./N


## Some LaTeX Tweaks…

Here are some $\LaTeX$ tweaks I used to prepare a template for one of our lab reports recently. Most of the help was received from http://tex.stackexchange.com/.

### Adding more columns to the index page than the default ‘Chapter No.- Chapter Name- Page’

\documentclass[10pt,letterpaper]{article}
\usepackage{lipsum,titletoc}

\titlecontents{section}
[0em]
{}
{}
{}
{\titlerule*[0.5em]{.}\contentspage}

\begin{document}

\noindent\begin{minipage}[c]{0.7\textwidth}
\renewcommand{\contentsname}{\Large \centerline{CONTENTS}}
\tableofcontents

\end{minipage}
%
\hspace{0.05\textwidth}
%
\begin{minipage}[c]{0.2\textwidth}
\begin{tabular}{lr}
\textbf{Date} & \textbf{Signature} \\[1em]

\end{tabular}
\end{minipage}\$



### Putting a Border Around Each Page

\begin{document}
\fancypage{%
\setlength{\fboxsep}{10pt}\doublebox}{}



### Preventing \chapter{} from beginning on a new page

\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother

\begin{document}
.......................

Tagged

## Transferring Contacts From Cellular Phone Between Devices

Just completed transferring the address-book entries from my old phone to a new one…!! Being the first time, I took almost half a day (!!!!! 😦 ) figuring out how to get it done.

My old device was a Sony Ericsson W200i…It wouldn’t sync with my PC (running XP) using the version of the PC suite that came along with it. Downloaded the latest version from here http://www.sonyericsson.com/cws/support/mobilephones/downloads/subject/pcsuite/1.218792?cc=gb&lc=en.

After the sync was complete, I exported the contacts from Microsoft Outlook Express into a .csv file.While doing this, I had to check all the boxes ( include all fields for all records), or else contacts which had multiple nos. associated with them missed some information when exported. This was because some nos. would be columns like ‘business fax’ etc., which normally, would not be included.

Now I had a .csv file in hand. Following the instructions from http://homepage.mac.com/phrogz/CSV2vCard_v2.html, i created .vcf file. This .vcf file was copied into my new phone, and then I imported it into my contacts!

Cheers 🙂 !!

Tagged , , ,

## ‘Undo’ a sent mail in Gmail!!!

Accidentally pressed the ‘send’ button before finishing your mail body??! It’s okay if you’re using Gmail 🙂 ,because Gmail has an ‘undo’ option to the ‘send’ action.

How to activate the ‘undo’ send option?

Settings–>Labs;  and enable ‘undo send’

Settings–>General;  set the cancellation period

Done!!

Now, once you hit the send button and the ‘your message has been sent’ pops up above your inbox, it’ll have an ‘undo’ option on its side. 🙂
Cheers!!

Tagged ,

## LaTeX trickz

Here are some ‘fine-tuning’ stuff for LaTeX that I recently learned. Was in the process of making a report for college, which required me to do the following formatting with LaTeX:

• Easily adjust the basic left, right, top and bottom margins.

Here is what i did for each of my requirement (obviously, learned from the vast knowledge base of the INTERNET 🙂 )

\usepackage{titlesec}

\titleformat{\chapter}[display]

{\normalfont\huge\bfseries\centering}{\chaptertitlename\ \thechapter}{20pt}{\Huge}

\renewcommand{\contentsname}{\centerline{Table of contents}}
\tableofcontents
\usepackage{simplemargins} %simplemargins.sty has to be copied to your local LaTeX directory or working directory
\setbottommargin{3cm}