Discussion Overview
The discussion revolves around a user's issue with obtaining an array output when using the inverse tangent function in MATLAB. The focus is on the correct usage of functions for array inputs, specifically addressing the confusion between 'arctan' and 'atan'.
Discussion Character
- Technical explanation
- Debate/contested
Main Points Raised
- One participant reports an issue where using the inverse tangent on an array results in a single number instead of an array.
- Some participants clarify that 'arctan' is not a built-in MATLAB function, suggesting that element-wise calculations are necessary.
- Others point out that 'atan' and 'atan2' are the correct built-in functions that can handle array inputs.
- A participant shares examples demonstrating the expected output of 'atan' when applied to an array.
- The original poster later acknowledges using 'atan' instead of 'arctan' and indicates that they received the expected array output after re-running their code.
Areas of Agreement / Disagreement
While there is agreement on the fact that 'atan' is the appropriate function for arrays, the initial confusion regarding 'arctan' and the circumstances leading to the single number output remain unresolved.
Contextual Notes
Participants discuss the importance of using built-in functions correctly and the potential for user error in inputting data. The discussion does not resolve the specifics of the user's initial problem.
Who May Find This Useful
Users seeking clarification on MATLAB functions, particularly those related to trigonometric calculations and array handling.