Given vectors X, Y of the same length and scalar lev,
Make a plot like this
- data in Y above the value of lev is red,
- data in Y below the value of lev is blue,
- a line is drawn across the entire axis in green at y = lev.
- Bonus challenge: make the crossing of the green line clean, i.e. it must touch the green line without a gap.
- Make the green line such that you can click and drag it vertically and the data will update underneath it smoothly.
Skills likely to be employed:
- Logical indexing
- Use of NaN
- Updating Handle Graphics objects with set.
- Good architecture
- Incremental testing of code.