Clear Filters
Clear Filters

Compare the graphs of ๐ฌ๐ข๐ง ๐’• and ๐œ๐จ๐ฌ ๐’• on the same plot, where the time ๐‘ก starts from 0 and ends at 4ฯ€, with an increment of T/100.

1 view (last 30 days)
Compare the graphs of ๐ฌ๐ข๐ง ๐’• and ๐œ๐จ๐ฌ ๐’• on the same plot, where the time ๐‘ก starts from 0 and ends at 4ฯ€, with an increment of T/100.
  2 Comments
Dyuman Joshi
Dyuman Joshi on 23 Oct 2023
This looks like awfully like a homework assignment, please show us what you have attempted yet.
Sam Chak
Sam Chak on 23 Oct 2023
Not exactly sure what aspect you are trying to compare the sine and cosine waves. Maybe the phase?
%% Two sinusoids on the same plot

Sign in to comment.

Answers (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 23 Oct 2023
You can use a few different MATLAB built-in fcns to get this exercise done, such as, colon ":" operator, plot(), hold, legend(), xlabel, ylabel, etc.
t = tmin:increment:tmax;
F1 = sin(t);
F2 = cos(t);
plot(t, F1, 'r-')
hold on
...
xlabel...
legend(..., ..., 'location', 'best')
hold off

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!