
A matlab program soving cubic equation
5227
$40/hr
- Posted:
- Proposals: 0
- Remote
- #122774
- Archived
Description
Experience Level: Expert
Consider the cubic equation
ax3 +bx2 +cx+d=0, (1)
where a, b, c, and d are real input coefficients. Develop a matlab program to find all roots of equation (1) using the methods discussed in class. Your program can not use the matlab built-in functions fzero and roots.
You should turn in a .m file cubicxxx.m which contains a matlab function of the form
function [rts,info] = cubicxxx(a,b,c,d)
where xxx is your student id, rts is the vector of roots and info is your output message. Your program will be stress-tested against cubic equations that may have
1. (40 points) random roots; or
2. (20 points) very large or very small roots; or
3. (20 points) multiple roots or nearly multiple roots; or 4. (20 points) less than 3 roots or more than 3 roots.
You will receive credit for a test polynomial only if your program gets the number of roots correctly, and only then will each correct root (accurate to within a relative error of at most 10−10, as compared to the roots function in matlab) receive additional credit.
Your program will receive 0 points if the strings fzero or roots (both in lower case letters) show up anywhere in your .m file.
ax3 +bx2 +cx+d=0, (1)
where a, b, c, and d are real input coefficients. Develop a matlab program to find all roots of equation (1) using the methods discussed in class. Your program can not use the matlab built-in functions fzero and roots.
You should turn in a .m file cubicxxx.m which contains a matlab function of the form
function [rts,info] = cubicxxx(a,b,c,d)
where xxx is your student id, rts is the vector of roots and info is your output message. Your program will be stress-tested against cubic equations that may have
1. (40 points) random roots; or
2. (20 points) very large or very small roots; or
3. (20 points) multiple roots or nearly multiple roots; or 4. (20 points) less than 3 roots or more than 3 roots.
You will receive credit for a test polynomial only if your program gets the number of roots correctly, and only then will each correct root (accurate to within a relative error of at most 10−10, as compared to the roots function in matlab) receive additional credit.
Your program will receive 0 points if the strings fzero or roots (both in lower case letters) show up anywhere in your .m file.
Bei Z.
0% (0)Projects Completed
-
Freelancers worked with
-
Projects awarded
0%
Last project
21 Jul 2026
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies