Blogger news

Thursday, 23 October 2014

Playing Audio sound in MATLAB

clc;
[w,f]=wavread('your file name');
player = audioplayer(w, f)
sound(w,f)
% new_w=w(1:500);
% stem(new_w)%   /* see what it sounds like */
t=0:1/f:(length(w)-1)/f;
n=length(w)
max_w=max(w)
min_w=0
delta=(max_w+min_w)/256
normal=(w/max_w);
plot(t,w,'r');
grid on

Sunday, 10 August 2014

Summation of even and odd element of matrix using MATLAB

clc;
m=input('ROW=');
n=input('Cloumn=');
x=randi([2,5],m,n)

Evensum=0;
oddsum=0;
for i=1:1:m