Saturday, January 28, 2012

What is the difference between rand and randn in MATLAB ?

We have two functions in MATLAB namely rand() and randn() to generate random numbers.  There exists a small difference between these two which lets us easy to use but complex to understand.

rand gives value from standard uniform distribution. That is they are in range [0,1].

randn gives value from standard normal distribution. A distribution with mean 0 and variance 1 is nothing but Standard Uniform Distribution. These are also in range [0,1]

In general we will use randn for generating random numbers.





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Thursday, January 26, 2012

Login to Google Account on Any Public Computer Without Password

Google moved a step forward in the field of security. We already know about the 2 step verification of our Google accounts login. Now in order to get rid of the keylogger problem, it introduced a new feature in fact. Its nothing but GOOGLE SESAME


The amazing thing here is you don't need to enter your password on a computer. If you need to access your google account on a public computer like an internet cafe or so, there is problem with keyloggers which are Fully UnDectactable (FUD).


Procedure : 



  1. Goto this URL on the computer
  2. QR Code (Quick Response Code) will be generated and displayed in the webpage
  3. We need to scan this QR Code using our mobile phone(Smartphones only). The smartphone can be  Android / iOS / Windows / Blackberry  or any other.
  4. This code is decoded into some URL on your mobile. You need to enter this URL on your mobile browser.
  5. It asks for your credentials like username and password.
  6. Type your login details.
  7. After that click on the button " Start with Gmail " or " Start with iGoogle ". 
  8. By doing the step - 7, you will be logged in automatically on your computer web browser.
  9. That's it !
The only appearing disadvantage is actual availability of a smart phone with every Google account user. 

Except this, Sesame is just amazing. But Let's wait and see until the highly self trained monkeys(Hackers) find some vulnerabilities. Till then, this is said to be most secure.






If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Saturday, January 21, 2012

Matlab filename.m run error

I've started learning and using MATLAB. Installed version 7.9.0 (R2009b). After learning few basics, moved to .m files. I created a file named 1.m and trying to run the file. But I couldn't. The error message is

" File C:\Users\RaviTeja\Documents\MATLAB\1.m is not found in the current directory or on the matlab path. "

It also offers some explanation i.e

" To run this file, you can either change the MATLAB current directory or add its directory to the MATLAB path "


Actually this error message and explanation, both are misleading in my case.

There are three things you need to check. They are :


  1. Change current directory to the file directory i.e to  C:\Users\RaviTeja\Documents\MATLAB\ in my case. If this is done, skip to step 3.
  2. Even by ignoring the above step, you can proceed. Goto file --> Set Path --> Add Folder --> select the folder in which your files are stored. This is preferable.
  3. File-names with .m as extension should start with a letter. This is the wrong step I did. So renaming my file 1.m to a.m solved my problem. Surely, this works for you .






PS : I'll start posting the errors which I've encountered daily from now on. Keep visiting

If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Monday, January 16, 2012

ctrl + A not working in Ubuntu

I've been suffering with this since few days. now i found the solution

most likely, you've changed the key theme to Emacs or any other in which ctrl + a doesn't mean select all.
So,
Run gnome-tweak-tool, "theme", and change key theme to default.





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Network location settings vanish after restart / reboot

This is all in windows 7 . I've been trying to connect two PCs with a network card in a LAN. I want to connect them offline i.e not through modem / router. So in order to make connection working, we should set the network location to Home.
  1. If you already know how to setup LAN, skip this step and goto step 2. Otherwise, continue reading. Open Network and Sharing Center --> Choose homegroup and sharing options. If you've already created a homegroup on some other system, it displays a " Join Now " button. Else, you'll have a button to " Create a new homegroup ". Before this, you need to select network location to " HOME " by clicking on " what is network location ? " hyperlink. Do the same to other system too. If already home group is created , Join it. After checking your connectivity, goto next step
  2. Sometimes, this network location changes to public after rebooting the system / PC . In order to retain those settings, following changes have to be applied.
    • Open run by pressing " windows button + R "
    • Type " services.msc " without quotes and hit enter
    • Check the services named " Peer Name Resolution Protocol " , " Peer Networking Grouping ", " Peer Networking Identity Manager " and " Homegroup Listener ", " Homegroup Provider "
    • All these five should be set to either Automatic or Manual.
    • Make sure that all the above five were started
Now reboot  your PCs and check that your changes retained.
If any problem encounters while setting up a LAN, please comment below






If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Thursday, January 12, 2012

How to Start a Program at High Priority Using Maximum Resources


Step I: First open Notepad and type:
Start “program name” /high “C:\Program Files\Program Location\Program.exe”
Here the program name stands for the program which you want to run, for example:
Start “flashget” /high “C:\Program Files (x86)\FlashGet\flashget.exe”
Step II: Now save it as program name.bat
For example: flashget.bat
If you click on the file command prompt will flash for a second and your program will run.
Now your task is finished (Do note that don’t use these steps on programs like flashget or any other programs that doesn’t need high priority). It is preferable for software like Photoshop or any Video converter which takes up more resources.





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

Thursday, January 5, 2012

Music maza | mp3dad

Here is cool music application. Mp3dad is an easy way to listen and download music. You can find your favorite songs in the multimillion database of quality mp3 links. It provides fast and relevant searches. You can also get the embed code of your favorite music to post on your blog.

Have a look at it. :)




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged