sampling

2 vues (au cours des 30 derniers jours)
Bahareh
Bahareh le 7 Jan 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.

Réponse acceptée

Wayne King
Wayne King le 7 Jan 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));

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by