Monthly Archives: August 2012

easy C++ coding under Linux (Ubuntu 10.04)

Here I am using Ubuntu 10.04 – gedit – g++ compiler and that’s it. check the code below, just enter it to your gedit and save the file with a name and .cpp extension (You can avoid using extension at … Continue reading

Posted in C/C++, Linux, programming, Ubuntu | Tagged , , , , , , , , , , , | Leave a comment

How to Calculate Eigenvalue / Eigenvector (3)

Eigenvector If you transform a Vector x, using a square matrix A, and the result vector be y and then the resulted vector is a scaled form of input vector now you can say x is an eigenvector for A. … Continue reading

Posted in Machine Learning, MATLAB, programming, Statistics | Tagged , , , , , , , , | Leave a comment

How to calculate Variance (2)

Variance of a random variable or distribution is the expectation/mean of the squared deviation of the variable from its expected value/mean: Var(x) = E[(x-mean)^2] How to calculate mean See below the MATLAB Code: %% calculate Variance Var(x) = E[(x-mean)^2] = … Continue reading

Posted in Machine Learning, MATLAB, programming, Statistics | Tagged , , , , , , , , , | Leave a comment

How to calculate Mean value/ Expected Value (1)

There are 3 main kind of MEAN: Arithmetic Mean / Geometric Mean / Harmonic Mean you can find related formulation here. And here is the MATLAB code to calculate 3 different types of Mean for a sample vector: %% How … Continue reading

Posted in MATLAB, programming, Reinforcement Learning, Statistics | Tagged , , , , , , | Leave a comment

Reboot & Shutdown commands in Linux (using terminal)

How to Reboot your Linux machine from Terminal? in terminal type this command : sudo reboot or : sudo shutdown -r now How to Shutdown your Linux machine from Terminal? in terminal type this command : sudo shutdown -h now … Continue reading

Posted in Linux, programming, Ubuntu | Tagged , , , , , , , , , , | Leave a comment

Using Function and Arguments C++ (in 9 steps)

in this example we are going to show, how to use function and arguments in C++ code, (Here I am using Ubuntu 10.04 / gedit / g++ compiler,) *If you do not have g++ compiler or it is not updated … Continue reading

Posted in C/C++, Linux, programming, Ubuntu | Tagged , , , , , , , , , , , , , | Leave a comment