Showing posts with label MATLAB. Show all posts
Showing posts with label MATLAB. Show all posts
Posted on
Wednesday, 11 April 2012
In this program you give your system coefficents and the Routh-Hurwitz table would be shown
Read More
The Routh-Hurwitz stability criterion is a necessary method to establish the stability of linear time invariant (LTI) control system.
More generally, given a polynomial, some calculations using only the coefficients of that polynomial can lead us to the conclusion that it is not stable. |
In this program you give your system coefficents and the Routh-Hurwitz table would be shown
clc
clear
r=input('input vector of your system coefficents: ');
m=length(r);
n=round(m/2);
q=1;
k=0;
for p = 1:length(r)
if rem(p,2)==0
c_even(k)=r(p);
else
c_odd(q)=r(p);
k=k+1;
q=q+1;
end
end
a=zeros(m,n);
if m/2 ~= round(m/2)
c_even(n)=0;
end
a(1,:)=c_odd;
a(2,:)=c_even;
if a(2,1)==0
a(2,1)=0.01;
end
for i=3:m
for j=1:n-1
x=a(i-1,1);
if x==0
x=0.01;
end
a(i,j)=((a(i-1,1)*a(i-2,j+1))-(a(i-2,1)*a(i-1,j+1)))/x;
end
if a(i,:)==0
order=(m-i+1);
c=0;
d=1;
for j=1:n-1
a(i,j)=(order-c)*(a(i-1,d));
d=d+1;
c=c+2;
end
end
if a(i,1)==0
a(i,1)=0.01;
end
end
Right_poles=0;
for i=1:m-1
if sign(a(i,1))*sign(a(i+1,1))==-1
Right_poles=Right_poles+1;
end
end
fprintf('\n Routh-Hurwitz Table:\n')
a
fprintf('\n Number Of Right Poles =%2.0f\n',Right_poles)
reply = input('Do You Need Roots of System? Y/N ', 's');
if reply=='y'||reply=='Y'
ROOTS=roots(r);
fprintf('\n Given Polynomials Coefficents Roots :\n')
ROOTS
else
end
Posted on
Monday, 12 December 2011
Read More
Ever LISTENED to a text message ???
No!!!
Well this project will make you do so.
Surprised ???
Don’t be because AUDIO STEGANOGRAPHY is the
method in which we can encode our secret messages on an audio signal
ensuring their safety. In this way we can decrypt a message on an audio signal
without its detection.
Lsb coding:-
The type of coding used in this project is the LSB
or the Least Significant Coding.
Least significant bit (LSB) coding is the simplest
way to embed information in a digital audio file. By substituting the least
significant bit of each sampling point with a binary message, LSB coding allows
for a large amount of data to be encoded.
Working:-
In this project we first read a wav file using the
MATLAB wavread command. Then we input a message from the user. This
message is then converted into its ASCII coded signal which then bit by bit
replaces the LSB of the wav file. In this way we convert our message into audio
form and transmit it.
At the receiver end when the signal is received or
the audio file is received, we just take out the last bit of the audio signal.
This now is our ASCII coded message we just convert it back into our message
signal.
The program is also generating a graphical user interface, from which you can easily hide the message and can then extract it later. All the related codes as well as the audio files can be downloaded here.
Posted on
Friday, 9 December 2011
The MATLAB code and related files can be downloaded here:-
Read More
Audio compression is data compression
designed to reduce the transmission bandwidth requirement of digital audio streams
and the storage size of audio files. Broadly compression techniques are
classified into two types:
- Lossless compression algorithms usually exploit statistical redundancy in such a way as to represent the sender's data more concisely without error. Lossless compression schemes are reversible so that the original data can be reconstructed
- Lossy schemes accept some loss of data in order to achieve higher compression.
In both lossy and lossless compression,
information redundancy is reduced, using methods such as coding, pattern
recognition and linear prediction to reduce the amount of information used to
represent the uncompressed data.
There are numerous methods of compressing
audio files. The Discrete Cosine Transform is a lossy technique that removes
certain frequencies from the audio data such that the size is reduced with
reasonable quality.
The Discrete Cosine Transform is a
first-level approximation to mpeg audio compression, which are more
sophisticated forms of the basic principle used in DCT.
This discrete cosine Transform Audio
Compression is performed in MATLAB.
It takes a wave file as input, compress it
to different levels and assess the output that is each compressed wave file.
The difference in their frequency spectra will be viewed to assess how
different levels of compression affect the audio signals.
PROGRAM WORKING:-
An audio waveform is a continuous sequence of data
in one long vector. In that sense, an audio data structure is different from an
image data structure. We will need to apportion the vector manually into
several pieces, and cannot rely on existing rows or columns.
- Read the audio file
- Determine a value for the number of samples that will undergo a DCT at once. In other words, the audio vector will be divided into pieces of this length.
- Again, we examine at different compression rates:
50%
75%
87.5%
- Resulting compressed-and-uncompressed audio waves
For simplicity, we iterate over the vector,
window-by-window, but we discard whatever remainder exists:
Now we plot
the time domain signals
However, closer inspection does reveal
qualitative differences in the densely packed regions (high frequencies).
A look at the spectrogram reveals a clear
idea of the loss of high frequencies.
The qualitative difference is clearly
apparent when listening to the audio files
- Saving the files and viewing the difference in size
CODE
%read a file and
convert it to a vector
%chosing a block
size
%changing
compression percentages
%initializing
compressed matrice
%actual
compression
%plotting audio
signals
%expanded view of
audio signals
%spectrogram of
audio signals
%playing files
Posted on
Saturday, 3 December 2011
Finger print recognition algorithm is used extensively in security related areas. For accessing any database, authenticating to any special services in your company or any other form of security service that use to ask about your ID cards or stuff like that previously.
Here we have provided the MATLAB code of the Finger Print Recognition Algorithm.
That takes the finger print as an image. The 'add to database' option lets you enrol your fingerprint into the database for future queries.
The 'match option then lets you match the finger print image with the database its going to have.
A user friendly GUI is also developed for this purpose with easily monitored buttons.
The attached file also have some fingerprint images for the testing purpose.
Downloads:
Read More
Finger print recognition algorithm is used extensively in security related areas. For accessing any database, authenticating to any special services in your company or any other form of security service that use to ask about your ID cards or stuff like that previously.
Here we have provided the MATLAB code of the Finger Print Recognition Algorithm.
That takes the finger print as an image. The 'add to database' option lets you enrol your fingerprint into the database for future queries.
The 'match option then lets you match the finger print image with the database its going to have.
A user friendly GUI is also developed for this purpose with easily monitored buttons.
The attached file also have some fingerprint images for the testing purpose.
Downloads:


