Matlab simulink help!

Thread Starter

Pika

Joined Jul 27, 2010
9
Hi everyone. I'm new to matlab/simulink.
i'm working on a project at school that involves taking data from an external source at 400 hz, but i'm suppose to output at 1200 hz. I have no idea how to do this. I'm also suppose to have this work real time. Can anyone tell me how i should do this?
 

shteii01

Joined Feb 19, 2010
4,644
You have a signal with frequency f=400 Hz.

You have sampling frequency fs=1200 Hz

We will assume that your signal is something like this: m(t)=1*cos(2*pi*400*t)

You need to find sampling period, it is Ts=1/fs

Then you pick how long your signal is, lets say it is 20 milliseconds.

So you get this:
t=0:Ts:0.020;
m=1*cos(2*pi*400*t);
plot(t,m)
 
Top