Matlab Only Outputting One Value

Hi, I am trying to evaluate the expression (cos(4*x) + sin(x))/(2*atan(2*x) + 2) for a list of x-values between 0:5. I go to solve but matlab only outputs one singular value. Also, when I try to plot it, nothing seems to come up. I'm sure the is definitely an error here with my thought process that maybe could do with some simplier explanations to help me understand. Does anyone know the reason for this and how to fix it?
code:
x = 0:1:5
x =
0 1 2 3 4 5
>> f = (sin(x)+cos(4*x))/((2*atan(2*x))+2)
f =
-2.401493151985125e-04
>>

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by