¿Como puedo traspasar esta serie a una funcion?8

1 次查看(过去 30 天)
fac = 1;
n = input ('favor de ingresar cantidadd e terminos:');
x = input ('Ingresar el valor de x:');
s = x;
para i = 2: n
fac = fac * ((i * 2) -1);
if (mod (i, 2) == 0)
s = 1 - doble ((x ^ (i * 2)) / fac
más
s = 1 + doble ((x ^ (i * 2)) / fac
fin
fin
disp ('el valor de Cos (x) se aproxima a:');
Es una serie del cos (x)
  1 个评论
Rik
Rik 2019-4-21
If you translate it to English this looks like valid and working Matlab code. What is your question?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by