Symsum undefined function error

3 visualizaciones (últimos 30 días)
R.sch
R.sch el 19 de Oct. de 2016
Comentada: R.sch el 30 de Oct. de 2017
I am trying to plot an equation with an infinite series using symsum.
I get this error when I try to plot it.
>> plot(x,.9-symsum((2./(n*3.14159)).*(sin(.1*n*3.14159))*(exp(-(n.^2)*(3.14159.^2)*x)),n,1,Inf));
Undefined function 'symsum' for input arguments of type 'double'.
Based on previous questions I thought it might be a problem of having the toolbox but that is in the right directory. Maybe I can't use symsum with my argument type, but is there another function I can use? Sum also didn't work (I got: Error using sum Dimension argument must be a positive integer scalar within indexing range.)

Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Oct. de 2016
First you need to
syms n
  3 comentarios
Viviana-Irina Petre
Viviana-Irina Petre el 30 de Oct. de 2017
Hello, what does "syms n" means and what it does?
R.sch
R.sch el 30 de Oct. de 2017
It declares a symbolic variable named "n"
https://www.mathworks.com/help/symbolic/syms.html

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by