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…

Our papers are 100% unique and written following academic standards and provided requirements. Get perfect grades by consistently using our writing services. Place your order and get a quality paper today. Rely on us and be on schedule! With our help, you'll never have to worry about deadlines again. Take advantage of our current 20% discount by using the coupon code GET20


Order a Similar Paper Order a Different Paper

Consider the cubic equationax3 + bx2 + cx + d = 0, (1)where a, b, c, and d are real input coefficients. Develop a matlab program to find all roots ofequation (1) using the appropriate methods. Your program can not use the matlab built-infunctions fzero and roots.You should turn in a .m file cubicxxx.m which contains a matlab function of the formfunction [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 have1. random roots; or2. very large or very small roots; or3. multiple roots or nearly multiple roots; or4. 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 rootscorrectly, and only then will each correct root (accurate to within a relative error of at most 10^-16,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.

function [rts,info]=cubic125(a,b,c,d)Q=(b^2-3*c*a)/(9*a^2);R=2*b^3/(27*a^3)-b*c/(6*a^2)+d/(2*a);R2=R^2;Q3=Q^3;if (R2<Q3) %Three real rootsthita=acos(R/sqrt(Q3));SQ=sqrt(Q);…

Writerbay.net

We offer the best essay writing services to students who value great quality at a fair price. Let us exceed your expectations if you need help with this or a different assignment. Get your paper completed by a writing expert today. Nice to meet you! Want 15% OFF your first order? Use Promo Code: FIRST15. Place your order in a few easy steps. It will take you less than 5 minutes. Click one of the buttons below.


Order a Similar Paper Order a Different Paper