Azzera filtri
Azzera filtri

sampling

2 visualizzazioni (ultimi 30 giorni)
Bahareh
Bahareh il 7 Gen 2012
I have a composition of 4 sinusoidal tones and would like to sample it at 50kHz. Here is my code:{t1=cos(2*pi*(0:.1:6)); t2=cos(2*pi*2*(0:.1:6)); t3=cos(2*pi*3.5*(0:.1:6)); t4=3*cos(2*pi*20*(linspace(2,2.1,length(t3)))); x=t1+t2+t3+t4;} Can anybody tell me how I can do it?Thanks.

Risposta accettata

Wayne King
Wayne King il 7 Gen 2012
Your data is currently sampled at at 10 Hz. Just redefine your t vector to use steps of 1/5e4. For example:
dt = 1/5e4;
x =cos(2*pi*(0:dt:6));

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by