I need to implement the following sinewave generator in matlab in order to do experiment with sampling?

4 views (last 30 days)
Implement a Matlab function function x = sinewave(A,F,t) that computes the amplitude values of the sine wave x(t) = A sin(2πF t) with maximum amplitude A, frequency F in Hz (cycles/second) and t an arbitrary time in seconds. Specifically ensure that t can be a vector of time values, for which x will be the corresponding vector of amplitudes. This function can now be regarded as a symbolic entity that simulates an analogue sine-wave generator.
  1 Comment
Stephen23
Stephen23 on 11 Feb 2015
Edited: Stephen23 on 11 Feb 2015
This looks like homework. Generally we solve homework on the following conditions:
  1. Written agreement of the course tutor/professor that our work can be submitted.
  2. Any course points or credits are allocated proportionally to those who wrote the code.
On a more serious note: What is your question? We are happy to help you, but we don't normally just write people's code for them. If you show use what you have tried so far, then we can give you advice and tell you what to fix or improve.
If you are just starting to learn MATLAB, and have no idea how to start to solve this problem, then you should work through MATLAB's own introduction and tutorials . The more you attempt yourself and the more you practice yourself, the more you will learn.
When you have specific problems, or something does not make any sense, come back and ask us. You might also like to read this:

Sign in to comment.

Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!