Anyone know why it isnt accepting my cos(2x) ?

20 次查看(过去 30 天)
x = -pi:2*pi;
f(x) = (cos(2.*x));
plot (f)

采纳的回答

Ameer Hamza
Ameer Hamza 2020-10-22
x = -pi:2*pi;
f = cos(2.*x); % f(x) is wrong
plot(x, f)
  3 个评论
Stephen23
Stephen23 2020-10-22
编辑:Stephen23 2020-10-22
e is not a defined constant. Use exp(x) to calculate e^x
Most likely you will also need element-wise division here:
h = (x^2-x+3)./(x-8);
% ^^
unless you really are trying to solve systems of linear equations.

请先登录,再进行评论。

更多回答(1 个)

galang andaru ibnu tetuko
how to find max value and error of cos(2x)

类别

Help CenterFile Exchange 中查找有关 MuPAD 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by