关于正弦和余弦函数的MATLAB程序

时间:2013-09-07 22:43:54

标签: matlab

所以我绘制正弦(w *时间)和余弦(w *时间)

是角频率。

希望如果我问的话,我不会浪费任何人的时间:

这看起来像一个圆圈吗?

我研究了很多但是大多数网站只是将正弦和余弦并排显示并进行比较。

我让它看起来像一个圆圈,我只是想知道这是否正确。

另外,我可以称这个情节为何?我刚刚给它一个标题“圆形图”。但是我想知道这是否足够专业,因为我正在上课。

感谢您的时间和答案。非常感激。

我感兴趣的人的MATLAB代码:

    clear all; clc; % clear the Workspace and the Command Window
    f = 2; w = 2*pi*f; % specify a frequency in Hz and convert to rad/sec
    T = 0.01; % specify a time increment
    time = 0 : T : 0.5; % specify a vector of time points
    x = sin(w*time); % evaluate the sine function for each element of the vector time
    y = cos(w*time);
    plot(x,y)
    axis equal
    grid on
    xlabel('sin(w*time)');ylabel('cos(w*time)');title('Plot of a Circle');
    axis([-1.1 1.1 -1.1 1.1]);
    print

2 个答案:

答案 0 :(得分:1)

这是我刚刚做过的Wolfram Alpha查询的链接:

http://www.wolframalpha.com/input/?i=x%3Dsin%28t%29%2C+y%3Dcos%28t%29

我不确定你想看到的是什么,但该网站(WolframAlpha.com)是一个探索和挑战新的数学概念的好地方。

另外,我将其称为圆形图,因为这是输出的样子。

答案 1 :(得分:1)

你正在制作Lissajous curve。请记住,余弦只是π/ 2弧度的正弦偏移,因此将正弦映射到余弦将确实产生一个圆。改变x(t)和y(t)之间的频率和/或相对相位将产生许多不同的有趣模式。

相关问题