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 次查看(过去 30 天)
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 个)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023-10-23
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

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by