Sign in

username or email:

password:



Not a member?
Forgot your password?

Search code



Search tips

Ads

See Also

Embedded SystemsFPGA

DSP Code Sharing > Unipolar NRZ

Unipolar NRZ

Language: Scilab

Processor: Not Relevant

Submitted by Senthilkumar R on Mar 24 2011

Licensed under a Creative Commons Attribution 3.0 Unported License

Unipolar NRZ


 

Nonreturn-to-zero unipolar : Discrete PAM Signals Generation

 
//Nonreturn-to-zero unipolar format: Discrete PAM Signals Generation
//Unipolar NRZ
clear;
close;
clc;
x = [0 1 0 0 0 1 0 0 1 1];
binary_zero = [0 0 0 0 0 0 0 0 0 0];
binary_one = [1 1 1 1 1 1 1 1 1 1];
L = length(x);
L1 = length(binary_zero);
total_duration = L*L;
//plotting
a =gca();
a.data_bounds =[0 -2;L*L1 2];
for i =1:L
  if(x(i)==0)
    plot([i*L-L+1:i*L],binary_zero);
    poly1= a.children(1).children(1);
    poly1.thickness =3;
  else
    plot([i*L-L+1:i*L],binary_one);
    poly1= a.children(1).children(1);
    poly1.thickness =3;
  end
end
xgrid(1)
title('Unipolar NRZ')
 
Rate this code snippet:
0
Rating: 0 | Votes: 0
 
   
 
posted by Senthilkumar R



Comments


No comments yet for this code


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )