Wednesday, August 12, 2015

Filters

Low Pass filter

High Pass filter
Narrow Band Pass filter

Wide Band Pass filter
Notch filter

Band Reject filter
 

Friday, August 7, 2015

dir() function

dir(name) 

attribute_name= dir(name)

  • dir(name) lists files and folders that match the string name. When name is a folder, dir lists contents of the folder.
  • attribute_name= dir(name) returns attributes about name.

 

disp() function

disp(x)

disp(x) displays the contents of x without printing the variable name

input() function

result = input(prompt)

str = input(prompt, 's')


  • result = input(prompt) displays the prompt string on the screen, waits for input from the keyboard, evaluates any expression in the input, and returns the result.
  • str = input(prompt, 's') returned the entered text as Matlab string, without evaluating expression.

length() function

 num = length(array) 

 length(array) returns length along the largest dimension of the array or matrix.


% Example
A = [101, 20;
    10, 24;
    11, 7];

%Function
ANSWER = length(A);

%Display result 
disp('Result: ');
disp(ANSWER);

Result :

3

zeros() function

X = zeros(n)

X = zeros(m, n)

  • zeros(n) returns n by n matrix of zeros
  • zeros(m, n) returns a m by n matrix of zeros

ones() function



X = ones(n) 

X = ones(m, n)

·         ones(n) returns n by n matrix of ones

·         ones(m, n) returns a m by n matrix of ones