how to sine wave plot

2 views (last 30 days)
Raouf
Raouf on 25 Apr 2023
Answered: Sam Chak on 25 Apr 2023
.
  3 Comments
Raouf
Raouf on 25 Apr 2023
Nothing yet
Dyuman Joshi
Dyuman Joshi on 25 Apr 2023
Then we can't help you. MATLAB Answers doesn't entertain homework questions.

Sign in to comment.

Answers (2)

Vilém Frynta
Vilém Frynta on 25 Apr 2023
Hello,
I'm sorry to tell you but Mathworks Answers is not a homework service. We do believe that it's best for you to try on your own, and then seek help when you are struggling.
You can ask your Matlab tutor or use Youtube or Matlab Documentation to get started on basics.

Sam Chak
Sam Chak on 25 Apr 2023
You can scroll down and find one example that is related to plotting a sine wave. 😉
help fplot
FPLOT Plot 2-D function FPLOT(FUN) plots the function FUN between the limits of the current axes, with a default of [-5 5]. FPLOT(FUN,LIMS) plots the function FUN between the x-axis limits specified by LIMS = [XMIN XMAX]. FPLOT(...,'LineSpec') plots with the given line specification. FPLOT(X,Y,LIMS) plots the parameterized curve with coordinates X(T), Y(T) for T between the values specified by LIMS = [TMIN TMAX]. H = FPLOT(...) returns a handle to the function line object created by FPLOT. FPLOT(AX,...) plots into the axes AX instead of the current axes. Examples: fplot(@sin) fplot(@(x) x.^2.*sin(1./x),[-1,1]) fplot(@(x) sin(1./x), [0 0.1]) If your function cannot be evaluated for multiple x values at once, you will get a warning and somewhat reduced speed: f = @(x,n) abs(exp(-1j*x*(0:n-1))*ones(n,1)); fplot(@(x) f(x,10),[0 2*pi]) See also FPLOT3, FSURF, FCONTOUR, FIMPLICIT, PLOT, FUNCTION_HANDLE. Documentation for fplot doc fplot Other uses of fplot symbolic/fplot

Tags

Community Treasure Hunt

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

Start Hunting!