How do I code to input x[n]signal to -1 or 1 for 0<n<10000 (arbitary output) digital signal processing Matlab

2 visualizaciones (últimos 30 días)
plz i can send you some bitcoin
  2 comentarios
Sung Hun Park
Sung Hun Park el 1 de Jun. de 2020
so,
i make input x[n] data (1or -1) for random 10000 data.
some impulse response h[n] (low pass filter) i use
and i will find output y[n]
and i want to know how to make those things and some useful code...
thanks

Iniciar sesión para comentar.

Respuestas (1)

Nikhil Sonavane
Nikhil Sonavane el 1 de Jun. de 2020
You can use the following code-
N=10000;
x=randi([0,1],N,1);
for i=1:N
if (x(i)==0)
x(i)=-1;
end
end

Community Treasure Hunt

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

Start Hunting!

Translated by