Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions