I'm trying to create a symbolic matrix initially filled with zeros. The error I'm getting is:
"Subscript indices must either be real positive integers or logicals."
The line of code that is producing the error is:
v = sym(zeros(5, 4)).
If I run this line of code in the Command Window, it works as expected. But, as part of a function in a script it produces the error.
Why this is?