Discussion Overview
The discussion revolves around finding the difference between two graphs plotted in MATLAB, specifically when the functions return arrays of different sizes. Participants explore methods to align the arrays for subtraction and address errors encountered during the process.
Discussion Character
- Homework-related
- Technical explanation
- Mathematical reasoning
Main Points Raised
- One participant describes their attempt to find the difference between two functions, f1 and f2, in MATLAB, and encounters an error when trying to subtract them directly.
- Another participant suggests that if f1 and f2 are arrays of the same size, the subtraction should work, recommending a different variable name for clarity.
- A participant explains that due to the numerical methods used for f2, the arrays may not be of the same size, raising the question of how to choose the t interval to make them compatible.
- One suggestion involves redefining the t variable after creating f2 to ensure both arrays are the same size.
- A participant shares their definition of f1 and the plotting process, but encounters an error related to treating f1 as a function instead of an array.
- Another participant points out that f2(10) refers to a single element, while f2 represents the entire array, highlighting a potential source of confusion.
- One participant proposes creating a new array from y2 data to match the size of y1, suggesting a method to select elements at regular intervals.
Areas of Agreement / Disagreement
Participants express various methods to align the sizes of the arrays for subtraction, but there is no consensus on a single solution, and some participants continue to face issues with array sizes.
Contextual Notes
Participants discuss specific MATLAB syntax and functions, but there are unresolved details regarding the definitions of the functions and the implications of numerical methods on array sizes.