Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CS240 Lab Exercise 09 Main topics: Function and Plotting Review 1. Open MATLAB 2. Create a Function file named Lab09 (a) Right click Current Folder
CS240 Lab Exercise 09 Main topics: Function and Plotting Review 1. Open MATLAB 2. Create a Function file named Lab09 (a) Right click Current Folder title of that window (b) Select New File by moving mouse to that option (c) Click on Function in the pop-up menu (d) Type Lab09 in the highlight field and hit the enter key 3. Double click the Lab09.m entry (that you just created) in the Current Folder window 4. Modify the Function file so that it: Computes the roots of a quadratic function f(x) = ax2 + bx + c, where a To compute these roots, use the quadratic formula 0 Think carefully about the function you have to write (a) (b) (c) (d) How many inputs should the function have? How many outputs? what should your function do if a 0? what if a 0 and b = 0? 5. Test your function by calling it with different values. You can write a script for this, or use the Command Window 6. For one of your function calls, plot a graph of the quadratic in the appropriate x-and y-axis viewing window to confirm the results of your function. Again, you can write a script for this, or use the Command Window 7. Once you get to this point, ask your TA to check you off for this lab. Be prepared to show them your function, your function calls, and your plot
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started