# Generate Random Bits Matlab

63 Threads found on edaboard.com: Generate Random Bits Matlab

## How to do the QPSK modulation in Matlab?

Just try this samples=10000; %whatever number of samples you want Z=rand(1,samples); Z(find(Z<=0.25))=-1; Z(find(Z>=0.75))=1; Z(find(Z>=0.25&Z<0.5))=-j; Z(find(Z>=0.5&Z<0.75))=j; what u have written is for baseband i suppose.. and more over, urs doesnt strictly follow any random distributiom.. i mean for more valu

## Perform run and correlation property on matlab..

Please help guys.. i need to perform the run and correlation property on a stream of bits that has been pseudorandomly generated. I have used the following piece of code: e.g x= randn(10,1)>0.5 to generate random bits of 0's and 1's. Is this the correct way of doing it or do i need to (...)

## Help me to find the appropriate code of matlab for QPSK

do you need a transmitter or receiver code? here is a code following you may use that code or compare your code with this one for any correction/improvement. for more info visit check this link also qpsk matlab code Code starts from here, visit th

## Need a good random generator for matlab

Does anybody know where to get a matlab file that generates very close to independent random samples? If you look at the higher order statistics of rand or randn, they are not as independent as I would like them to be. Any suggestions? hi, inorder for u to generate random numbers, u could use the PN (...)

## HOw to simulate 8-PSK moduator in MATLAB

If u want to write a script then i wud suggest the following: 8PSK symbols consist of 3 bits -Suppose u need to generate N bits total≈N/3 symbols -start with taking 3 bits in an array at a time and compare this with (000) or (011) etc and assign the 8psksig to be equal to (x+iy) where (x,y) E {-1,0,1} depending (...)

## Matlab functions for AWGN and fading channel models

%-------------------------------------------------------- % generate a random list of information bits (0/1) encoder_in=randint(1,L_info,2); encoder_out=cnv_encd(G,k_in,encoder_in); %-------------------------------------------------------- if addinter ==1 en_output1 = (...)

## help me with coding in Matlab - trying to generate PRBS

Can anyone help me with coding in matlab?? I'm trying to generate PRBS and then add noise (AWGN) to it. Then try to decode it using sequential decoding(hard decision).. Does any1 know how to do this? PLEASE HELP ASAP... Thanks in advanced

## Urgent ! need help with my project

I am a newbie, and i would really appriciate the help of you guys. This project is required to my Digital communication course. Due to many issues and the huge projects that im working on i cant finish it, and it need to submit it tomorrow till 11:59PM otherwise i'll fail the course. please help me with the matlab code.

## monte carlo simulation to demonstrate the performance of Coordinated beamforming.

You need to: 1. generate random bits and store them 2. modulate them (QPSK) 3. do whatever transmit MIMO processing you have 4. send them across a channel 5. demodulate them (QPSK demod) 6. compare your demodulated bits to transmit bits; BER from monte carlo is given by (...)

## pseudo random sequence preamble

hi, i have to generate a 64 bit length pseudorandom sequence. I mean to code in VHDL. Is there a necessity for knowing the polynomials that are required for genereating the sequence... or how to know from which of the register i have to tap the output??? i wanted to know this method for generating any length PN sequence. or any other way out is

## Problem with the transfer function & freq. spectrum of A

currently i am doing research in awg(array waveguide grating) and i am facing a problem on the transfer function of the awg as i got a pulse shape act like a multiple filter, and i dont know whether is it correct or not. secondly is i am facing problem on the frequency spectrum of my input signal as i cant generate it properly in frequency spect

## Help me with software simulation of QPSK

Hi, folks I wanna do software simulation for the quadrature phase shift keying (QPSK), but don't understand the principle very much. If using the rand function to generate the original message. Then how to divide the original message into I and Q channel. Just simply put the odd number of the original message to I channel and even number to Q

i want to design simulink model as follows give image input to crc generator block(available in simulink) i also want to view this image,(lets say if i had to view a signal i would use oscilloscope)next crc generator block will take 48 image bits calculate crc and will produce the output(image +crc bits) now i want to add noise again i want

## If a layout uses Q random walk can INL and DNL be <1 LSB?

To simulate INL and DNL by Hspice and Specture is hard and waste time.Ususlly simulate the converter's FFT is another economic method. Dear schwang1970, I try use simulink to do A/D. I generate my inputs. But my inputs are 0 or 1. They are not regular.How do I do that my inputs connected my 12 bits D/A. And how

## CDMA matlab simulation with gold codes

Hi I guess the right thing to do is the following 1. generate the random signals, take the FFT and show its spectrum. 2. spread the signal using any code, take the FFT and show its spectrum. 3. add noise (the simplest case is AWGN), despread the signal, take the FFT and show its spectrum. I am not sure if you did that in your figures above

## How to verify a long series of bits is random or not ?

A direct way to check if the sequency is truly random is to use auto-correlation function in matlab. A true random sequence should generate a Dirac type auto-correlation output, whose Fourier Transform should give you 'white' spectrum density function. In matlab, you can use xcorr(A), where A is your (...)

## Does any one have QAM,QPSK,BPSK, etc...Matlab codes

i need the matlab to generate 64 qam and also to convert 64 qam to 16qam

## MATLAB CODE for invisible watermarking using LSB

I've never used the reshape function so I can't help you there. So you're using an image as the watermark. During my course we called it stamping. How are you embedding the watermark in the spatial domain or the frequency domain? You will need to determine a default size of your stamp compared to the image you're stamping so that the psnr would be

## MATLAB PROGRAMING + gaussian finction

HI...I am doing my degree project on Sequential decoding... Can any1 plz help me to write the matlab codes? actually i do understand the steps involved but i don't know matlab.. 1.generate PRBS 2.encode using convolutional encoder 3.add noise 4.sequential decoder 5.decode sequentially(hard decision-trees) 6.compare encoded (...)

## Helpe me with a task simulation of digital modulations

hi everybody!i need some help with this example!!could you please somebody help me!? 1. Simulation of digital modulations generate the vector of random bits (hint: you can use rand in matlab) . Map them according the constellation of QPSK, BPSK, 8PSK or 16QAM (selectable by the user). Filter the signals by raised (...)

## BPSK-QPSK-8PSK (I NEED HELP AS SOON AS POSSIBLE PLEASE!)

hello everybody ! i need help with this example!!!could you please help me?!any body?!!? 1. Simulation of digital modulations generate the vector of random bits (hint: you can use rand in matlab) . Map them according the constellation of QPSK, BPSK, 8PSK or 16QAM (selectable by the user). Filter the signals by raised (...)

## Need help in matlab codes for MIMO!!

Hmm... why it seems like there's some error with the code? It says 'error using pskmod' and 'too many input argument'. Anyway, how do I load the video into the code for transmission? How to split it into frames so that it could be transmitted? Thanks! Added after 4 minutes: SAJ25, here is the code frm math

## matlab code for ofdm using rs coding

hey friend, i didn't realize myself this code just from this forum, so you will change apprapriative rules, just i will show you some examples, because nobody doesn't write full code gor you just they will show you way, sorry it is true. this is channel but with DQPSK change pls to QAM; M = 4; % Use DQPSK in this example, so M is 4. x = randi

## Phase Shift Keying simulation on Matlab

Deat friends, im stuck with the following problem. I need to generate a binary data stream/array e.g x= of duration T seconds. I can do the array using rand function but still im unable to understand how to do the duration of T s. also for me to be able to proceed to QPSK modulation i need to find the I and Q streams

## 64 QAM in MATLAB without quammod

generate a random bit stream. Group 6 bits into one complex symbol. The complex symbol should be one of the points in the constellation. You need to first define the constellation points and just map 6 bits into one of the constellation point. Does this answer your question? or you want to do more?

## QPSK passband demodulation - For Experts

Thanks Mathuranathan you helped me understand how to define the band width of a filter. but how do I define the bit rate W? which kind of parameter is will change the W? The term "Bit rate" literally means how fast we want to transfer the data with the available bandwidth. For example in the case of GSM the available

## BER output problem for Radio over Fiber system/Optical Comm

Hi guys, this is my first work in optical and first simulation in matlab. I am sorry if there is mistake and im really new to this. Here is what I did, im simulation an entire Radio Over Fiber system with matlab, linear system. Let me insert my code first, %*****************************Defining constant parameter**************** %Rb

## problem with rectangular pulse frequency (urgent)

Hi there, I have been simulating a system in matlab. So Im not good with communication basics and im very new to it. Here is the problem. Im using rectpulse function from matlab, the it needs a sampling rate to generate rectpulse from random bits. So the sampling rate is calculated using, (...)

## help needed Generator of data for OFDM in matlab

I just start with my final project of OFDM with QAM to generate a rondom data i just did FFTLen = 64; % Length of FFT. M = 4; % bits encoded in a QAM symbol. input = randint(FFTLen*M,1) > 0.5% 0 or 1 then i did a in blocks of 4 rows with 64 symbol input_para = reshape(input,FFTLen,M); later when i do the command qammmod

## How to design an ISI channel in MATLAB?

your code is not wrong in syntax but the channel you generate is not practical. do you have any syntax errors in this code ? The delay spread is the length of the channel (16 * sampling period) and the symbol time is the length of the symbol (usually = sampling period), the degree of ISI can be quantified as delay spread/ Symbol duration = it means

## help in correcting error in following matlab code

How to generate delay in the following bit sequence using matlab. My bit sequence is d(n) = and my delay has to be d(n-1)... What is the matlab code for generating delay d(n-1). Thanx.

## help in matlab code of fsk

hello... I have to write a matlab code for fsk transmitter. I have generated a binary data sequence. Converted those bits into frequencies of 10000 hz and 8000 Hz. if input bit=1 ten the signal will b a cosine wave having frequency 10000 Hz and if the input bit=0 ten the signal will b a cosine wave having frequency 8000 Hz. after this wat (...)

## help in ask modulation and demodulation in matlab

Hello, I have written a matlab code for ask modulation and demodulation. I have taken 1 bit at a time, modulated tat bit, added noise to it and demodulated that bit to recover the original data bit. I need to modify this code for all the bits present in the data sequence.... I have to repeat the above steps for 10 bits... How to do tat.. (...)

## poly2trellis help needed - matlab

Hi all, I need to add convolutional coding for the program below, but i dont understand what I need to the poly2trellis(ConstraintLength,CodeGenerator) variables for ConstraintLength,CodeGenerator. my messages are 10 binary bits long so matrix. any help please?? clear, clc; Eb=1; i = 0; trellis=poly2trellis); for SNR=0:16 erro

## how to write matlab code for random process

how to generate an ensemble that consists of 1000 waveforms, each containing 1000 bits,for the line codes(Unipolar,Return to Zero,AMI)

Hi, This is the old reply.. i delete it because i coded it and i send you the code. i advise you : 1. You must precise fc (carrier frequency), fs (sampling frequency) and B (baud rate). Then, N=fs/B will be the number of sample in one symbol of period T=1/B; 2. Time vector t=0:1/fs:(N-1)/fs; % time for one symbol 3. M=4; % 4 state for

## does fft function in matlab have gain?

hello all, i wrote this code: N=10000; %number of data bits data=randn(1,N)>=0; %generate uniformly distributed random data Fs=20*10.7e+6; %Sampling frequency Rb=Fs*(1/10); Tb=1/Rb; Fc=10.7e+6; snrdb=10; % Eb/N0 range in dB for simulation time_bpsk=0:(1/Fs):Tb*(length(data))-(1/Fs); carrier=cos(2*pi*Fc*time_bpsk); figure; (...)

## measurment SNR from spectrum in matlab

hello all, i tried to measure the CNR from the spectrum of a noisy carrier but the result is not precise, i get 6.6 dB attenuation from the real CNR, im sure that this is because i dont normalize something, can somebody please tell me how to do it correctly or what is the problem in my code. my code: N=10000; %number of data bits

## Help in error in matlab code

Hello everyone, I have written a matlab code for BPSK modulation. Here in the program, I have first generated random binary bits. Modulated the bits with BPSK modulation. Added noise to the bpsk modulated signal. My matlab code is as follows: clc; close all; clear all; (...)

## 2x2 MIMO-OFDM with ZF EQ. Matlab Code Help

hello, I'm working in my Graduation Project on MIMO-OFDM Implementation using matlab i made the following code but i m a little lost , can't figure out what to do next , i generated the data , modulated them , then branched the data into 2 branches to be sent , but i cant figure out how to multiply the channel matrix by the modulated data matrix

## Digital oscilloscope Project

Advanced transient waveform digitizers. A series of multi-channel transient waveform digitization integrated circuits with up to 5 GHz sample rates and parallel 10-bit digitization has been designed, tested, and fabricated in large quantities. The current CMOS circuit uses four arrays of

## How to eye diargam in the USB phy simulation

use verilog to generate the test pakage and simulate use hspice

## Project to replace CY7C64613 in the ICD2

I don't think we should deal with anything regarding the circuit or protocol or connection between 877 and 4550 yet. I think ALL we need is written in the 4550 bins supplied with MPLAB. We should write a bootloader compatible with the icd2w2k.sys to get the OS.bin downloaded, and after that we can scracth our heads how the 877 is connected. [siz

## Space-Time Turbo Coder with all the required modulation methods

This program is for Space-Time Turbo Coder and all the required modulation methods are included. %Space-Time Turbo Coder echo off clear all clear clc dec_alg = input(' Please enter the decoding algorithm. (0:Log-MAP, 1:SOVA) default 0 '); if isempty(dec_alg) dec_alg = 0; end awgn = input(' Please choose AWGN/Rayleigh (+1/-1): d

## 16-QAM and Rayleigh fading channel

hi can u help me i m having the same problem of getting a ber of 0.5 when passing the signal through rayleigh i have to perform any equalization if then how? shuld i use interlaving ? m not working on simulink i have to generate matlab code i m working on Mimo-ofdm as my MSc Project. i will be very thankful if u can help m

Hi everyone, currently i am doing a system level design for a direct-convertion receiver by using simulink, including create the AGC block diagram,etc. it is my first time to do the system level design, i have spent more than a month on reading papers and searching online for the detail of the block design using simulink, but all of them just tell

how one can generate two path fading and transmiits ddata on it in matlab ?

## testing ofdm system for varying dopler frequency

dear friends.. did anybody used the function by name : rayleighchan in matlab.. actually when i use this function for simulating my ofdm system by making dopler frequency = 0 working well..but when i make dopler frequncy Fd is varying the code is not giving any performance variations.. could u pls suggest me whether i have

## CB0703-PCB for "PICkit 2" DIY(Do It Yourself) fans

some PICs need more Interesting, can you post some instance? From "PICkit 2 Readme.txt": ----------------------------------------------------------------- 1. Device Support List ----------------------------------------------------------------- (...) + Indicates parts that require 4.75V minimu

## help on PN sequence required

Ideally, random sequences should have a infinite length. But Pseudo-random (PN) sequences are finite length sequences with semi-randomness in the elements in sequences. Some examples are M (or maximal length)-sequence, Gold sequence. They show good but not ideal correlation properties, i.e., auto-correlation for non-zero shifts and (...)