Why do I get "Array indices must be positive integers or logical values" error when using "angle" function? >> z = 22+i >> a = angle(z) >> z = 22.0000 + 1.0000i Array indices must be positive integers or logical values.
John Williams answered .
2025-11-20
Based on the error message, it seems like you have a variable with the name "angle" stored in your workspace that overshadows the "angle" function