Today i will share a very useful and important link for us , CS students . It’s a very good practice to learn from others who have succeded it before us So stop programming for a while and begin to read this paper . To sum up , he says there is 7 key things to do it :

- Learn how to write before graduating.
- Learn C before graduating.
- Learn microeconomics before graduating.
- Don’t blow off non-CS classes just because they’re boring.
- Take programming-intensive courses.
- Stop worrying about all the jobs going to India.
- No matter what you do, get a good summer internship.

1 says it is more important to learn how to communicate your work to others in both spoken and written English.Writing a blog is a good practice.

We also should learn C programming although we will never use it in a project.Joe says this is the language every computer scientits use to communicate with each other (sure it is!) for example they chat like :

Cs1 : printf (“hi Cs2 how it is going”)

Cs2 :scanf (“%s”,%Cs1) , printf (“thanks Cs1 , every think is well”)

Also an important thing i see in the article is it says dont blow off boring non-CS classes.It says that it means you just work when the work is fun but no employer searches a funny CS graduate who works just to have fun! Every work has a boring line.

Whole article is in here : http://www.joelonsoftware.com/articles/CollegeAdvice.html

See ya !

]]>A code developer must do all its work on linux because there is so much useful libraries , scripts and other good stuffs here for you to develop good things with them.Someone says its so hard to get used to it , dont believe them and begin as quickly as possible.

To begin to use Ubuntu , first i downloaded it from internet , as you guess its all free .You can use these links for installation guide and download :

http://www.ubuntu.com/download/ubuntu/download

https://help.ubuntu.com/community/Installation

http://seogadget.co.uk/the-ubuntu-installation-guide/

Ubuntu comes with a default Desktop enviroment called GNOME , and it seems so much like a windows , you can listen to music , surf on web , use office programs just like you did it on microsoft windows . So no problem…

Ubuntu gives you chance to work on different Desktop enviroments , they differ on Ram usage and other capabilities. As a developer my teacher said we need a superlight Desktop enviroment , then i choose XFCE . Its also so easy to download and begin to use . You can also get info about Xubuntu from there :

http://www.psychocats.net/ubuntu/xubuntu

Then Ubuntu = Command window , you can do a lot using command window , and you will if you go on using this OS . I will share some important command for us beginners on it , and there is also so much useful link for this subject , please read efficiently the Linux Command part , they are so good :

Some important commands … You can add a new user by typing ;

**>>useradd**

You can change password by typing **passwd ** command .

Using **cd** command will change current directory and **pwd** will print the current directory you are still working in .

Then some file operations , you can add a new directory using **mkdir** command ,it is removed using **rmdir** .

You can move files using **mv** command and also can erase them using **rm** command .

A very important thing : Dont act as a superuser !! Its so much important , on linux as a default there is a superuser , who is unlimited and can do and change everything , and other users who are called normal . As a superuser , you can erase everything or change system configurations which will result in a fatal way .Dont do it . To act as a normal user , use sudo command , like :

**>> sudo apt get install**

command will install what you will type as argument on linux as a normal user .

Now i will come some development things . Using linux for development is different from how we do on windows . The steps for printing Hello world in C language like that :

1) Open a file in your current directory and write these codes in it :

**# include <stdio.h> // standart in and standart out steams library
**

**int main () {**

**printf (“Hello world”);**

**return 0;**

**}**

2 ) Save this file as “hello.c” then close it .

3)Open your command window , first we must compile to use it . To compile , type this command on window :

**gcc -o hello hello.c**

GCC is C compiler on linux and know what to do ,reprocessing , compiling , linking …

-o command means an output named hello will be written after compilation completed .

4) Now we are ready to run it . You run programs on linux by these commands :

**./hello**

This will print a hello world to our page.

For a last thing , i will talk about OpenCV libraries . I will use OpenCV libraries on linux for our school projects and as you guess first i have to install it on my Ubuntu . OpenCV is a image processing , gui development and computer vision free library of Intel.So much thanks to Intel for publishing it free .

Like a lot of user , i use SAMONTAB s method on installing and trying libraries , the adress is here :

http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/

It works fine , then try face detection example to make sure if you do all steps good .

Thanks for reading , i will go on sharing about linux and OpenCV and C development using linux . I hope Bye !

]]>

Today i will talk about ;

**Intensity transformations and spatial filtering**

Spatial domain processing :

1) intensity (gray level) transformations

2) spatial filtering

g (x,y) = T [f (x,y)] : general form of spatial filtering

f is the input image and g is the output image , T is an operator on f , defined over a specified neighbourhood about point (x,y) .

when we work with color images , intensity is used to denote a color image component certain color spaces .

**Function imadjust **

** **

A basic image processing toolbox tool for intensity transformations of gray scale .

G = imadjust (f,[low_in high_in],[low_out high_out], gamma)

This function maps the intensity values in image f to new values in g , such that values between low_in and high_in values between low_out and high_out values .

Values less than low_in and above high_in clipped . It means that values above high_in map to high_out and values less than low_in clipped to low_out .

The input and output image is the same class; unit8 unit 16 etc .

>> f = imread (‘40977.jpg’);

>> g = imadjust(f,[0 1],[1 0]);

>> imshow (g)

This is the digital equivalent of obtaining a photographic negative , useful for enhancing white or gray detail embedded in a large , predominantly dark region .

Negative of an image can also be called with imcomplement function.

>> g = imcomplement(f);

>> imshow (g);

Ex :

>> g2 = imadjust (f,[0.5 0.75],[0 1]);

>> imshow (g2)

This example expands the gray scale region 0.5 and 0.75 to the full 0 1 range . It is great for highlighting an intensity band of ineterest .

Ex :

>> g3 = imadjust (f,[],[],2);

>> imshow (g3)

More gray tones …

**Logarithmic and Contrast-Stretching Tranformations **

Basic tools for dynamic range manipulation .

G = c*log(1+double(f))

C is a constant . Shape is similar to the gamma curve .

It is also used to compress dynamic range . For example , it is not unsual to have a Fourier spectrum with values in the range [0 10^6] or higher . When we display it on the monitor , it is scaled linearly to 8 bits , high values dominate the display , resulting in lost visual detail for lower intensity values in the spectrum .

By computing the log , a dynamic range on the order of , for example 10^6 , is reduced to approximately 14 , which is much more manageable .

While working logarithmic transformation , it is often desirable to bring the resulting compressed values back to the full range display .

For 8 bits , it is easily done like that :

G4= im2unit8 (mat2gray(g)); % using mat2gray brings the values to the range [0 1] and im2unit8 brings them to the range [0 255]

Later this transformations will be easier .

**Contrast-Stretching Function **

Compresses the input levels lower than m into a narrow range of dark levels in the output image ; it compress the values above m into a narrow band of light levels in the output . Result is an image of higher contrast .

This limiting function called **thresholding function** , a simple tool used for image segmentation .

**S = T(r) = 1/ (m/r)^E**

** **

** **

** **

** **

** **

E controls the slope of the function .

We can implement this in Matlab like that ;

G = 1./(1+double(f)+eps)).^E

(suppose E is 20)

Use of eps prevents any overflow if f has any 0 values

See you !

]]>

Today i will share some arithmetic operations with C++ like addition , multiplication , transpose and inverse

1)ADDITION

this program takes a 3×3 matrix as an input and gives the total value (2xN) .

—————————————————

#include <iostream>

using namespace std ;

int main ()

{

int i,j,b[3][3]={0},n[3][3]={0}; // definition of variables

cout<<“enter the values for 3×3 matrix : “<<endl;

// cout<<“entering to for …”<<endl;

for(i=0;i<3;i++){

for(j=0;j<3;j++) {

cout<<“(“<<i<<“,”<<j<<“)=”;

cin>>n[i][j];

cout<<endl;

b[i][j]=2*n[i][j];

}

}

////////////////////////////////////////////////////////////////////////////////////

//addition printing

cout<<“Sum : “<<endl;

for(i=0;i<3;i++){

cout<<endl;

for(j=0;j<3;j++) {

if (i==2 && j==2) cout<<‘\t’;

cout<<“(“<<i<<“,”<<j<<“)=”<<b[i][j]<<‘\t'<<‘\t’;

}

}

//end of addition printing

////////////////////////////////////////////////////////////////////////////////////

cout<<endl;

system (“pause”);

}

—————————————————

2)MULTIPLICATION

In this program i take values of a 3×3 matirx and take square of it

—————————————————

#include <iostream>

using namespace std ;

int main ()

{

int i,j,c[3][3]={0},a[3][3]={0},n[3][3]={0}; // defition of variables

cout<<“enter values for 3×3 matrix : “<<endl;

// cout<<“entering to for …”<<endl;

for(i=0;i<3;i++){

for(j=0;j<3;j++) {

cout<<“(“<<i<<“,”<<j<<“)=”;

cin>>n[i][j];

cout<<endl;

c[i][j]=n[i][j]*n[i][j];

}

}

////////////////////////////////////////////////////////////////////////////////////

//multiplication display

cout<<“carpim : “<<endl;

for(i=0;i<3;i++){

cout<<endl; cout<<‘\t’;

for(j=0;j<3;j++) {

if(i==2 && j==2) cout<<‘\t’;

cout<<“(“<<i<<“,”<<j<<“)=”<<c[i][j]<<‘\t’;

}

}

////////////////////////////////////////////////////////////////////////////////////

cout<<endl;

system (“pause”);

}

—————————————————

3)TRANSPOSE

In this program , i take values of a 3×3 matrix and display the transpose of it ,

(if you dont know about transpoze matrix :http://en.wikipedia.org/wiki/Transpose )

—————————————————

#include <iostream>

using namespace std ;

int main ()

{

int i,j,a[3][3]={0},n[3][3]={0};

cout<<“enter values for 3×3 matrix : “<<endl;

// cout<<“entering to for …”<<endl;

for(i=0;i<3;i++){

for(j=0;j<3;j++) {

cout<<“(“<<i<<“,”<<j<<“)=”;

cin>>n[i][j];

cout<<endl;

a[j][i]=n[i][j]; // calculating the transpose

}

}

////////////////////////////////////////////////////////////////////////////////////

//transpose printing

cout<<“tranpose : “<<endl;

for(i=0;i<3;i++){

cout<<endl;

for(j=0;j<3;j++) {

cout<<“(“<<i<<“,”<<j<<“)=”<<a[i][j]<<‘\t’;

}

}

////////////////////////////////////////////////////////////////////////////////////

system (“pause”);

}

—————————————————

4)INVERSE

In this program , i calculate the inverse of a 3×3 matrix , i use determinant method , you can also find inverse programs done by gauss-jordan method

—————————————————

#include <iostream>

using namespace std ;

int main ()

{

cout<<“enter values for 3×3 atrix : “<<endl;

// cout<<“entering to for …”<<endl;

int z,j,i,n[3][3];

double a[3][3];

for(i=0;i<3;i++){

cout<<endl;

for(j=0;j<3;j++) {

cout<<“(“<<i<<“,”<<j<<“)=”;

cin>>n[i][j];

cout<<endl;

}

}

// adjoint matrix calculation

a[0][0]=n[1][1]*n[2][2]-n[1][2]*n[2][1];

a[0][1]=n[1][2]*n[2][0]-n[1][0]*n[2][2];

a[0][2]=n[1][0]*n[2][1]-n[1][1]*n[2][0];

a[1][0]=n[0][2]*n[2][1]-n[0][1]*n[2][2];

a[1][1]=n[0][0]*n[2][2]-n[0][2]*n[2][0];

a[1][2]=n[0][1]*n[2][0]-n[0][0]*n[2][1];

a[2][0]=n[0][1]*n[1][2]-n[0][2]*n[1][1];

a[2][1]=n[0][2]*n[1][0]-n[0][0]*n[1][2];

a[2][2]=n[0][0]*n[1][1]-n[0][1]*n[1][0];

z=n[0][0]*a[0][0] + n[0][1]*a[0][1] + n[0][2]*a[0][2];

////////////////////////////////////////////////////////////////////////////////////

// inverse printing

cout<<“determinant : “<<z<<endl;

cout<<“inverse of matrix : : “<<endl;

for(i=0;i<3;i++){

cout<<endl; cout<<‘\t’;

for(j=0;j<3;j++) {

if(i==2 && j==2) cout<<‘\t’;

cout<<“(“<<i<<“,”<<j<<“)=”<<a[j][i]/z<<‘\t’;

}

}

cout<<endl;

////////////////////////////////////////////////////////////////////////////////////

system (“pause”);

}

—————————————————

We did some arithmetic calculations with C++ today , see you !

]]>

I will not share myknowledge and notes todaybut some useful links for PCB design . We all design circuits and sometimes we want to make them live .

So we use PCB designers like multisim , proteus for this purpose .

But there are important steps while designing a PCB shematic .

We must learn these steps carefully to draw good PCBs .

First site is just for learning PCB design . They cover all of the details which are so important in daily life .

http://www.pcbdesign.org/pcb-design-guide/

They also share PCB softwares and Design services to users .

The other site is sparkfun . Sparkfun is a good electronics site , so they have some useful tricks for PCB design . They tell it with photos examples .

http://www.sparkfun.com/tutorials/115

The last site is fivemanconspiracy . The title is “Pcb basics and gEDA/Pcb tips and tricks “

http://www.fivemanconspiracy.com/node/14

I will also share useful Youtube videos for this purpose , See you !

Layout Process part-1

Layout Process part-2

]]>

I will tell them in 2 parts , first for this lesson i will give ; Elements of probability , What it means to be a random variable , Jointly distributed random variables , some statistical properties like Variance , Expectation .

We live in a random world , everything is going randomly so we should learn how events reacts to our daily lifes , this is so amazing .

Probability and random process is a hard task to learn , because we use our brain to think on all deterministic , but real world does not include any deterministic event , that is all going sthocastic .

I use matlab to simulate random variables , that makes my mind a bit clear to see how random variables react when we try and try again .

My aim is not to give all probability theorems in this text , you can find on the net easily that tasks ;

**-Elements of probability ; sample spaces , outcomes , events , axioms of probability , conditional probability , bayes rules (this rule is so much important for us to get the probabilistic idea) , dependent-independent events **

**You can use this youtube video to make an introduction to probability , what it means to be probabilistic :
**

You should learn them because we will use them all on the way of probabilistic theories .

**There is also an ebook that is about elements of probability : **

www.faculty.ucr.edu/~xpcui/courses/stat160a/lectures.pdf

I will not tell mathematical teories that you can find everywhere , but usage of them .

For probability simulations : http://www.mathsonline.co.uk/nonmembers/resource/prob/

How can we relate them into realistic problems .

Let’ begin .

** What is a Random Variable ? **

When an experiment is performed , we are interested in the value of numerical quantities determined by the result .

For example , a civil engineer may not be directly concerned with the daily risings and declines of the water level of a reservoir , but may care about the level at the end of the rainy season.

These quantites of interest that are determined by the result of the experiment are known as Random Variable .

————————————-

Ex. : Let X denote the random variable that is defined as the sum of two fair dice , then ;

P(X=2) = P{1,1} = 1/36 ;

P{3}=P{(1,2),(2,1)} = 2/36 ;

…

P{12}=P{(6,6)}=1/36 ;

As you see , r. d . P is taking integral values between 2 and 12 .

————————————-

Looking at this example , r.d takes on finite number of possible values . Random variables whose set of possible values can be written either as a finite sequence

X1,X2,…Xn

or as an infinite series , said to be **discrete, **

**so we call this variables “discrete random variables”
**

There are also r.d which takes values on continuum of possible events . These are known as “continous random variables”.

**The Cumulative Distribution Function**

It is also called distribution function , F of the random variable X is defined for any real number x by ;

F(x)= P{X<=x}

That means , F(x) is the probability that the random variable X takes on a value that is less than or equal to x .

————————————-

Ex : A key step in manufacturing integrated circuit requires baking the chips in a special oven in a certain temperature range . Let T be a random variable modelling the oven temperature.

Show the probability the oven temperature is in the range a<T<=b can be expressed as

P (a<T<=b) = P(T<=b) – P(T<=a)

or

F(b) – F(a)

————————————-

Ex : A computer has three disk drives numbered 0,1 and 2 . When the computer is booted , it randomly selects a drive to store temporary files on .

If we model the selected drive number with the random variable X , show that the probability drive 0 or drive 1 is

P (X=0 or X=1) = P(X=0) + P (x=1)

Or means Union .

Ex : Suppose random varible X has distribution function ;

F(x) =

0 if x<=0

1-exp(-x^2) if x>0

What is the probability that X exceeds 1 ?

P (X>1) = 1-F (1)

exp(-1) = 0.368

————————————-

**Properties Of Random Variables**

For a discrete random variable , we define Probability Mass Function (PMF) by ;

p(a) = P {X=a}

Pmf is greater than zero for all values of X , 0 for others .

————————————-

Ex : Consider a random variable X that is equal to 1,2 or 3 .

p(1) = 1/2 , p(2) = 1/3 , so what is p(3) ?

As we remember , sum of sample space must be 1 , so ;

p(1) + p(2) + p(3) = 1 ;

p(3)= 1/6

Pmf of 3 is 1/6

————————————-

Cumulative Distribution is replaced by Probability Density Function (PDF) when we have continous random variable .

**Jointly Distributed Random Variables**

Sometimes we model real world problems with more than one random variable , so we use relationship of two or more random variables for them .

For example , suppose we study on possible causes of cancer , we might be interested in the relationship between the average number of cigarettes smoked daily and the age at which and individual contracts cancer .

To specify these positions , we use Cumulative probability distribution function as ;

F (x,y) = P {X<=x,Y<=y}

So we can obtain , for example X from that equality ,

F (x) = P {X<=x}

=P {X<=x,Y<inf}

=F(x,inf)

We can also write probability mass function as ;

p (Xi,Yi) = P {X=xi,Y=yi}

They are said to be independent if one event does not effect the other at the same time or place .

P {X=xi,Y=yi} = p(xi) x p (yi)

**EXPECTATION**

That is an important concept int probability . If X is an discrete random variables taking values x1,x2,…. ;

E [X] is the sum of xi x P {X=xi} .

That means ; the expected value of X is a weighted average of the possible values that X can take on , each value being weighted by the probability that X assumes it .

For instance , if the probability mass function is given like ;

p(0) = 1/2 = p(1)

then

E [x] = 0 x 1/2 + 1 x 1/2 = 1/2

is a weighted average of the two possible values of 0 and 1 .

Let s roll a die !!!!

————————————-

Ex :

we got 1,2,3,4,5,6 and probability 1/6 .

E [X] = 1*1/6+2*1/6+3*1/6+4*1/6+5*1/6+6*1/6 = 7/2

7/2 does not mean that we expect a 3.5 score from rolling a die , it means that is the average value of die when we roll it much more !

————————————-

**VARIANCE**

It is useful to know some properties about proability mass functions , like Expectation .

But expectation itself does not tell us anything about variation , or spread , of these values .

Like ;

W = 0 with proability 1

Z = -1 with probability 1/2 , 1 with probability 1/2

have same expectation values , so it means nothing for us .

Because we expect X to take on values around its mean E[X ], it would appear that a reasonable way of measuring the possible variation of X would be to look at how far

apart X would be from its mean on the average. One possible way to measure this would be to consider the quantity E[|X − μ|], where μ = E[X ], and [X − μ] represents the absolute value of X −μ.

However, it turns out to be mathematically inconvenient to deal with this quantity and so a more tractable quantity is usually considered — namely, the expectation of the square of the difference between X and its mean.

Var (X) = E [(X-μ)^2] , also an alternative formula is like that ;

Var (X) = E [X^2] – μ^2

Var (aX) = a^2Var (X)

PROBABILITY WITH MATLAB

I will share with you some statsistical commands on Matlab like rand , randn , mean , median , var and std

We can use matlab to genereta random variables by using statsitical toolbox features .

For example **rand (m,n) **command will give us a m x n dimensin random numbers , lets do it :

————————————————

Ex :

>> rand (5,8)

ans =

0.8147 0.0975 0.1576 0.1419 0.6557 0.7577 0.7060 0.8235

0.9058 0.2785 0.9706 0.4218 0.0357 0.7431 0.0318 0.6948

0.1270 0.5469 0.9572 0.9157 0.8491 0.3922 0.2769 0.3171

0.9134 0.9575 0.4854 0.7922 0.9340 0.6555 0.0462 0.9502

0.6324 0.9649 0.8003 0.9595 0.6787 0.1712 0.0971 0.0344

———————————————-

**randn()** is a bit different from rand , it generates random numbers with zero means and variance of unity , lets practice :

———————————————

Ex :

>> x = randn (1,400 );

>> var (x) , mean (x) , median (x) , std (x)

ans =

0.8872

ans =

-0.0418 % as you see , mean is so much closer to zero

ans =

-0.0445

ans =

0.9419

You can also find** mean** and **median** of the given data by using mean and media commands , like that ;

————————————————

Ex :

>> X = [ 3 5 8 7 9 6 5 4 7] ;

>> mean (X)

ans =

6.55

>> median (X)

ans =

6

———————————————-

We also have commands for **variance **and **standart derivation** calculations like : **var (x) **and **std (x) ** as you see in randn example

Here is another link that tells expectation and variance :

http://www.mathsrevision.net/alevel/statistics/expectation.php/

Thats all for that lesson , but i will share important and must see videos from youtube , See You !

video1

video2

]]>Today i will share a new source of electricity : Electricity From The Air .

Yes they manage to collect the electricity from the air .

It is much like solar cells capture sunlight and uses them in ligthning and other home aplliances .

They say ““Our research could pave the way for turning electricity from the atmosphere into an alternative energy source for the future.”” .

He goes on , “If we know how electricity builds up and spreads in the atmosphere, we can also prevent death and damage caused by lightning strikes”

As you remember , that was the dream of Nikola Tesla , the magnificient genius , to capture and use the electricity in the air .

They call it as **“hygroelectricity” **which means humidity electricity .

**Here is a useful link for hygroelectricity :** http://www.worldchanging.com/archives/011530.html

Their aim is now to design panels like solar cells to use this new hygroelectricity in home , and to prevent lightning from striking and causing people to die .

**The details are here , full paper , Take care . **

http://powerelectronics.com/images/IndustryHighlights1010.pdf

]]>**—————————————————————-**

** ** **Embedded micro controllers**

**—————————————————————-**

** Microprocessors**

- Solid-State Devices
- Semiconductor Theory
- Microwave Devices and Circuits
- Analog Electronics.

**—————————————————————-**

**Systems and Controls:**

- Control Systems
- Manufacturing,
- Discrete Event Control,
- Neural and Fuzzy Control,
- Nonlinear Modern Control,
- Biomedical Signal Processing and Instrumentation

**—————————————————————-**

**Electromagnetic Fields and Applications:**

- Remote Sensing
- Electromagnetic Fields
- Microwave Systems.

**—————————————————————-**

**Digital Signal and Image Processing:**

- Vision Systems,
- Neural Networks,
- Statistical Signal Processing,
- Nonlinear Image Processing,
- Virtual Prototyping,
- Virtual Environments.

**—————————————————————-**

**Telecommunications and Information Systems:**

- Information Transmission and Communication Systems

**—————————————————————-**

**Power Systems and Industrial Power Electronics:**

- Efficient Operation,
- Generation,
- Transmission,
- Distribution, Deregulation;
- Power Electronics Engineering.

**—————————————————————-**

**Optical Devices and Systems:**

- Optics Electro-optics,
- Diffractive Optics,
- Nonlinear Optics,
- Lasers.

**—————————————————————-**

**Nanotechnology and MEMS – Materials and Devices:**

- Quantum Electronic Devices,
- Semiconductor Surfaces and Interfaces,
- Single Electron Devices,
- Sensors and Detectors,
- Carbon Nanotube Devices,
- Noise and Reliability in Nano-Electronic Devices,
- Microactuators,
- RF MEMS,
- Polymer Electronics, and
- Nanophotonics

**—————————————————————-**

**Bioelectronics Engineering**

**—————————————————————-**

**Nanoelectronics and Photonics**

**—————————————————————-
**

**Specizialition options in Computer Science **

** **

**Software Engineering**

** **

** Software Testing**

** **

** Database**

** **

** Multimedia Database**

** **

** Distributed Database**

** Artificial Intelligence**

** Robotics**

** Bioinformatics**

** Computer Networking**

** Wireless Networking**

** Computer Architecture**

** Algorithms and Data Structures**

** Operating Systems**

** Information Security**

** Theoretical Computing**

Iostream class allows user to enter input values .

“cin” which means console input let us give an input to the program

Eg:

———————————————————

**// C02 Eg 4**

**//converts decimal to octal and hex**

**#include <iostream>**

**using namespace std ;**

**int main ()**

**{**

**int number;**

**cout <<“enter a decimal number=”; // we want user to enter a value**

**cin >>number ; // we take value by console**

**cout <<“value in octal = 0” // we print the value by cout object in octal form**

**<<oct<<number<<endl ;**

**cout <<“value in hex=0x” // we print the valueby cout object in hexademical form**

**<<hex<<number<<endl ;**

**system (“pause”); // we tell to program that wait until we push any key**

**}**

—————————————————————-

**Calling Other Programs**

While writting codes , any program can be called by using Standart C function system () , that is declared in **<cstdlib> **

**E.g : **

**————————————————————–
**

**//C02**

**//calling other programs eg.5**

**#include <cstdlib> // we declare system ()**

**using namesapce std ;**

**int main ()**

**{**

**system (“Hello”);**

**system (“pause”);**

**}**

**————————————————————–**

**Introduction to strings**

To use string , we must include “string.h” file to the program ,

String class is in the namespace of std so we will also add a using directive .

Eg :

————————————————————————–

**// C02 hellostrings**

**//introdcution to strings eg**

**#include <string>**

**#include <iostream>**

**#include <cstdlib>**

**using namespace std ;**

**int main ()**

**{**

**string s1,s2 ; // we name two empty strings**

**string s3 = “Hello,world.”; // s3 is initialized**

**string s4 (“i am “); // another type of initilalizing**

**s2 = ” Today”; // assigning to string**

**s1 = s3+” ” +s4 ; // you can combine strings like that**

**s1 +=”8″ ; // append to string is by using += operator**

**cout <<s1 + s2 + “!” << endl ;**

**system (“pause”);**

}

These program will also work like that :

————————————————————

Thanks for reading, that’s all for today .

]]>**Fourier Analysis**

Hi !

Today i begin to share a new area , a genius theory from Joseph Fourier. Fourier says that any engineering signals can be represented as a series sum of sine , even square and triangle waves .

Sine waves have many interesting properties , many natural operations deal with a set of differing frequency sine waves as if they were processed individually .

We will learn the technique of expressing waves in terms of sine,this will allow us to use them as we want them to be.

Suppose your signal has noise at a particular frequency (may be 30-40 HZ) , we can pick apart the data to its constituent parts,remove the noise frequency , then stictch the rest back together to get a signal without the noise . This kind of notch filtering is very useful in audio signals .

In** image processing**,it is possible to look at an image and distil it down to small blocks , then look at each of the line;

now we can treat each line as a 1D signal,it’s then easy to see how you would apply the same techniques to the data that you would with any other signal . Let’s begin our theoric expansions.

sine wave

**Trigonometric Fourier Series**

What it means to be periodic ? When we use periodic for a signal , we say that you get the same samples in the same intervals ;

**f (t) = f (t+nT) means that for every period T .**

Any periodic function of frequency wo can be expressed as an infinite sum of sine and cosine functions that are integral multiples of wo.

**f(t) = a0 + a1cos(w0) + b1sin (w0)+…..**

in this equation,we can take (a0) as DC part of our signal,which is linear and not wavy .(a0) is also called the average value of f(t) (remember the average value of sinusoids are zero)

Also ;

**w0 = 2*pi/T;** which is called “fundamental frequency in radians per second”

Another important term is harmonic; The **sin(nwot) or cos(nwot) is called nth harmonic of f(t).**

**(an)** and **(bn)** are called **“Fourier Coeficcients .”** Our work is to find these coefficients to transform our time domain signal through frequency domain.

so ,let’s ask; Why we need Fourier Series of a function,why function itself is not enough for us ?

The fourier series of a periodic function f(t) is a representation that analyzes f(t) into a DC component and AC component comprising an infinite series of harmonic sinusoids.

Your fourier series must contain these conditions ;

**1).f(t) is single-valued everywhere in the domain**

**2).f(t) has a finite number of finite discontinuities in any one period .**

**3).f(t) has a finite number of maxima and minima in any one period .**

As i say earlier , the process of determining the coefficients is called “Fourier Analysis” .

Let’s translate what we say into math !

I will share some trigonometric properties in the chart below , It tells you how to calculate ao,an and bn values for analysis .You will see that average values of sinusoids are zero in an interval.

**Here is a useful Fourier Analysis video , that tells what it means to transform functions , A must see 3 video :**

Fourier transform-1

Fourier tranform-2

Fourier Transform-3

See al videos after reading my paper , See you next lesson

Take Care!

]]>