Discussion Overview
The discussion revolves around troubleshooting a MATLAB function intended to compute an integral using the quad function. Participants are addressing issues related to the function's definition and usage, particularly how to properly implement variable parameters in the integration process.
Discussion Character
- Technical explanation
- Debate/contested
- Homework-related
Main Points Raised
- One participant presents a MATLAB function B(m,n) intended to compute an integral but encounters issues when running the m-file.
- Another participant identifies two main problems: the function is defined after its call to the quad function, and it is improperly defined in terms of m and n instead of x.
- A participant expresses frustration with MATLAB and requests further guidance, indicating difficulty in understanding the implementation.
- Further advice is given to hardcode the function in terms of x rather than m and n, emphasizing that quad substitutes values only for x.
- A suggested alternative function, quadEvaluator(m,n), is provided, which constructs the function string dynamically using m and n, allowing for proper evaluation of the integral.
- Participants emphasize the importance of sharing specific error messages to facilitate troubleshooting.
Areas of Agreement / Disagreement
Participants generally agree on the need to redefine the function in terms of x for proper integration. However, there is no consensus on the best approach to resolve the initial issues, as some participants continue to struggle with the implementation.
Contextual Notes
Limitations include the need for clearer definitions of m and n before calling the quad function, as well as the requirement for the function to be defined correctly within the m-file structure.