sampling

2 Ansichten (letzte 30 Tage)
Bahareh
Bahareh am 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.

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by