Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab Intro to User-Defined Functions 1. Download the quadratic.m file from Canvas and make sure the file is in today's directory. **quadratic.m file: function [root1,

Matlab Intro to User-Defined Functions

1. Download the quadratic.m file from Canvas and make sure the file is in today's directory.

**quadratic.m file:

function [root1, root2] = quadratic(a, b, c) % [root1, root2] = quadratic(a, b, c) % Solves the roots of a quadratic expression using the known coefficeints % a*x^2 + b*x + c % a, b, and c are the inputs to this function and the two roots are the % output

root1 = (-b + sqrt(b.^2 - 4.*a.*c))./(2.*a); root2 = (-b - sqrt(b.^2 - 4.*a.*c))./(2.*a);

end

**

2. Solve for the roots of the following polynomials:

A. x2 + 4x + 2

B. 3x2 + 2x

C. 2x2 + 4

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: 3

blur-text-image

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions