how to create pulse train with random data(0 and 1) of HCS pulse

조회 수: 2 (최근 30일)
Durgaprasad Srinivasa
Durgaprasad Srinivasa 2019년 10월 31일
clc;
clear all;
close all;
tp=2.2676*10^-3;
Ts=22.6757*10^-6;
fc=4000;
Tc=(1/fc);
fs=44100;
n=101
t=0:Ts:n*Ts;
fp=(1/tp);
w=2*pi*fp;
p=sin(w*t);
p(find(p<0))=0;
figure(1)
subplot(3,1,1);
plot(t,p);
data = randi([0,1],1,1000);
This is the code i have for the HCS pulse and random data of 1 and 0 ... i need to get 1000 random 0 and 1 pulse train of HCS.
can anyone please help.
Tahnk you in advance.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by