Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to generate sine wave in m code

Subject: How to generate sine wave in m code

From: Michael

Date: 18 Nov, 2010 06:17:02

Message: 1 of 2

I'm new to matlab. I need to use the interpft function to interpolate a signal so I can multiply it to a higher frequency, then filter with a bandpass. The interpft function uses an input vector and a sample value. I need to multiply by the sine wave, but don't know how to specify the time portion of the sine wave
7 = amplitude x sin(frequency x time + phase) + bias

Or if someone could point me to embedding the interpft function in a block for simulink I could go that route.
Thanks!

Subject: How to generate sine wave in m code

From: Wayne King

Date: 18 Nov, 2010 12:30:08

Message: 2 of 2

"Michael " <michael.w.carson@boeing.com> wrote in message <ic2gcu$enk$1@fred.mathworks.com>...
> I'm new to matlab. I need to use the interpft function to interpolate a signal so I can multiply it to a higher frequency, then filter with a bandpass. The interpft function uses an input vector and a sample value. I need to multiply by the sine wave, but don't know how to specify the time portion of the sine wave
> 7 = amplitude x sin(frequency x time + phase) + bias
>
> Or if someone could point me to embedding the interpft function in a block for simulink I could go that route.
> Thanks!

Hi Michael, why do you need to use interpft? Are you working in Simulink? Do you have the Signal Processing Blockset? There is an FIR interpolation block in the SP blockset.

Wayne

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us