Plotting Fourier Functions in Matlab - Help?

In summary, to plot a Fourier function in Matlab, you first need to define the function using the appropriate syntax, such as f = @(x) cos(x). Then, you can use the "plot" function to plot the function over a specified range of x values. The syntax for defining a Fourier function in Matlab is f = @(x) cos(x), where "f" is the name of the function, "@" indicates an anonymous function, and "cos(x)" is the mathematical expression for the function. To adjust the frequency and amplitude of a Fourier function in Matlab, you can modify the mathematical expression used to define the function. You can also plot multiple Fourier functions on the same graph in Matlab by defining each function separately and using the
  • #1
chief10
78
0
Plotting Laplace Functions in Matlab - Help?

SORRY I MEANT LAPLACE FUNCTIONS

Homework Statement



so we have a function

f(t) =
|2t, 0≤ t < 2
|(t^2)-3, 2≤t

how would you plot this over 0≤ t ≤4 in Matlab?


Homework Equations



-

The Attempt at a Solution



I guess you could work out the step functions or even employ t-shifting but that still leaves me with no idea on how to plot this thing in Matlab, I've read the notation on the mathwork site but I'm just stumped.

Any ideas guys and girls?

-chief10
 
Last edited:
Physics news on Phys.org
  • #2
could somebody delete this thread..
 

1. How do I plot a Fourier function in Matlab?

To plot a Fourier function in Matlab, you first need to define the function using the appropriate syntax, such as f = @(x) cos(x). Then, you can use the "plot" function to plot the function over a specified range of x values. For example, plot(x,f(x)) will plot the function f(x) over the range of x values defined by the vector x.

2. What is the syntax for defining a Fourier function in Matlab?

The syntax for defining a Fourier function in Matlab is f = @(x) cos(x), where "f" is the name of the function, "@" indicates an anonymous function, and "cos(x)" is the mathematical expression for the function. This syntax can be modified for different types of Fourier functions, such as sine, cosine, or a combination of both.

3. How do I adjust the frequency and amplitude of a Fourier function in Matlab?

To adjust the frequency and amplitude of a Fourier function in Matlab, you can modify the mathematical expression used to define the function. For example, multiplying the cosine function by a constant will adjust the amplitude, while changing the argument of the cosine function (e.g. cos(2*x)) will change the frequency. You can also use the "plot" function to visualize the changes as you modify the expression.

4. Can I plot multiple Fourier functions on the same graph in Matlab?

Yes, you can plot multiple Fourier functions on the same graph in Matlab by defining each function separately and then using the "hold on" command before plotting each function. This will allow you to plot multiple functions on the same graph without overwriting the previous plot. You can also use the "legend" function to label each function on the graph.

5. Is there a built-in function for plotting Fourier functions in Matlab?

Yes, there is a built-in function in Matlab called "fft" (Fast Fourier Transform) that can be used to plot Fourier functions. However, this function is typically used for more complex applications and may require some knowledge of signal processing. For simpler applications, it is often easier to define the Fourier function using the syntax described above and then use the "plot" function to visualize it.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
286
  • Calculus and Beyond Homework Help
Replies
6
Views
390
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
997
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Replies
1
Views
1K
Back
Top