Revision as of 19:06, 17 January 2011 by Kjhajari (Talk | contribs)

Krishna Jhajaria
ECE 301 Homework 1

1. Matlab Code


for X=1:3
    if X==2
        BPS=112/120;
    else
        BPS=112/60;
    end
    if X==3
        A4=440*2;
    else 
        A4=440;
    end
    
    Delta=.00005;
    One=0:Delta:BPS;
    Half=0:Delta:BPS/2;
    Quarter=0:Delta:BPS/4;
    Eighth=0:Delta:BPS/8;
    Dotted_Q=0:Delta:BPS*.375;
    G_Q = sin(2*pi*(2^(-1/6)*A4)*Quarter);
    Bf_Q = sin(2*pi*(2^(1/12)*A4)*Quarter);
    C_DQ = sin(2*pi*(2^(1/4)*A4)*Dotted_Q);
    Df_E = sin(2*pi*(2^(1/3)*A4)*Eighth);
    C_H = sin(2*pi*(2^(1/4)*A4)*Half);
    G_H = sin(2*pi*(2^(-1/6)*A4)*Half);
    notes=[G_Q, Bf_Q, C_DQ, G_Q, Bf_Q, Df_E, C_H, G_Q, Bf_Q, C_DQ, Bf_Q, G_Q];
    if X==1
        wavwrite(notes, 1/Delta, 'regular');
    elseif X==2
        wavwrite(notes, 1/Delta, 'fast');
    else
        wavwrite(notes, 1/Delta, 'high');
    end
    
end




2. Hidden Message

[Notes, Fs, Bits] = wavread('Beatles.wav');
Reverse = flipud(Notes);
wavwrite(Reverse,Fs, 'Beatles_Reverse');


The forward message is "Number 9"
The backward message is "Let me on Dead man"

Alumni Liaison

Basic linear algebra uncovers and clarifies very important geometry and algebra.

Dr. Paul Garrett