MATLAB: Undefined function or variable k symsum

kSymbolic Math Toolboxsymssymsumundefinedvariable

Why am I receiving an error when using the "symsum" function?
error: Undefined function or variable 'k'.

Best Answer

  • This error is because the symbolic variable, 'k', needs to be created before using this function.
    >> syms k