Matlab code needed!!

Discussion in 'Programmer's Corner' started by zico, Jan 19, 2007.

  1. zico

    Thread Starter New Member

    Jan 9, 2007
    5
    0
    I need matlab code for the program.program will take binary coded signal like [0 1 1 0] then convert this signal to digital signal by encoder.after signal is modulated the program adds noise to the signal.Signal+noise is demodulated then converted to binary coded signal by decoder.The program should adjust the noise level.At the end, the program should compare the input binary code and output binary code for any errors.But I can't write the code in Matlab.I don't have enough knowledge.Can you help me?:rolleyes:

    Or just takes the binary coded signal,puts noise then filters it.The output is the detected signal which is a binary signal too.For low noise levels the input and output signals are same.But at high noise, error will occur in detected signal.The program should compare the output and input signals..
    Thanks for your concern have a nice day...:) :)
     
  2. mlkcampion

    Active Member

    Nov 16, 2006
    59
    0
    Hey Zico
    I have done something very similar. I can't remember what modulation it was i think it was CDMA. Anyway that doesn't matter. The key thing is i create a string of bits (variable lenght if i remember) , matlab has built in functions, its very easy. I modulate it and then use a built in function called awgn() to add the noise (additive white gaussian noise). Thats all in the transmitter section. The receiver then demodulates it and compares the input string to the received string and again if i remember properly graphs the BER.
    I can send you the code if you post your email? I'd have to dig it out, but if i find it i have alot other information and links that might help.

    Michael
     
  3. zico

    Thread Starter New Member

    Jan 9, 2007
    5
    0
    so many thanks micheal it would be really nice if you post the links or the program.My mail adress is zyercan@yahoo.com
    Thanks for your help.:) :)
     
  4. mlkcampion

    Active Member

    Nov 16, 2006
    59
    0
    Hey Zico
    I will send you the information shortly, unfortunately iam at work and all the files are on my computer at home, it will be about 6hrs before i get home and i will send it straight away. Sorry for the delay!!

    Michael
     
  5. SZ_52

    New Member

    Mar 24, 2008
    1
    0
    Hey, i hope anyone of you people still have the code, i need something similar to what zico posted so if there is anyway i can get the code on matlab can yo usend it to my email, MaherJabri@gmail.com, thanks in advance
     
  6. aya2002

    New Member

    Apr 18, 2010
    1
    0
    see this code:

    %% POLAR NRZ-L
    clc;
    clear all;
    close all;
    %% Data Generation

    nb=1000; % Number of bits

    data=randint(1,nb);

    %% Setting Parameters

    ts=1/100; % Sampling Time

    t=0: ts : ( nb - 1) * ts; % Time Vector

    V=1; % +- V
    %% algorithm
    p_nrz=(data*2-1)*V;

    subplot(3,1,1);stairs(t(1:20),data(1:20));title('Line Codes')
    ylim([-1 2]);xlabel('t');ylabel('DATA');grid on
    subplot(3,1,2);stairs(t(1:20),p_nrz(1:20));ylim([-V-1 V+1]) ;
    xlabel('t');ylabel('POLAR NRZ-L');grid on
    %% Decoding
    dcdata=p_nrz>0;
    subplot(3,1,3);stairs(t(1:20),dcdata(1:20));ylim([-V-1 V+1]) ;
    xlabel('t');ylabel('ORIGINAL DATA');grid on

    regards
     
  7. hari1692

    New Member

    Jan 29, 2013
    3
    0
    can any1 tell me how to transform an audio to image in matlab using wavelet transformation???
     
Loading...