Question
I am in need of help with the following problem. I have the anonymous function and arrays of the a,b,c elements created. The writing of
I am in need of help with the following problem. I have the anonymous function and arrays of the a,b,c elements created. The writing of the for loop is where I'm stuck. Any help would be greatly appreciated.
The quadratic equation solves for the roots of a polynomial equation: x = b (b^2 4ac ) / 2a With MATLAB write two anonymous functions for the quadratic equation, one for the addition of the root term and one for subtraction of the root term. y1, y2 and y3 are 2nd order polynomials whos roots can be found using the quadratic equation. y1 = x^2 + 45x 4, y2 = 3x^2 + 36x 9, y3 = 5x^2 + 25x + 2. Create vectors a, b and c that contain the respective a, b and c coefficients from each equation. Write a for loop that solves for the positive and negative roots by looping through the positions. The roots should be output into a 3 2 matrix where the positive roots and in the first column and the negative in the second.
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