sum() function gives error
Show older comments
Code for simple creation of array and calculating the sum using the sum() function.
I copied the code from the documentation and it just won't work for me.
Can anyone help me out!!
(I only have the trial version and I have tried the code in the online trial version as well as on the trial software)

Answers (2)
madhan ravi
on 18 Jul 2020
clear sum
Bruno Luong
on 18 Jul 2020
Edited: Bruno Luong
on 18 Jul 2020
1 vote
You have created a variable named SUM in your workspace that shadows MATLAB stock function SUM.
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!