4.CODE:
clear all;close all;clc;
r=[-2,3,8];
x= sym('x');
poly_eqn=expand(prod(x-r))
OUTPUT:
poly_eqn =
x^3 - 9*x^2 + 2*x + 48
5. CODE:
clear all;close all;clc;
% write equations as standard matlab vectors...
%adjust their coefficient arrays putting zeros for absent powers,
so that
% coefficients of terms with the same power will be on the same
positions within both coefficient arrays.
eq1=[0 1 0 -1 3];
eq2=[0 0 1 0 -8];
eq3=[1 0 0 0 2];
added_coeff=eq1+eq2+eq3;
%to get back the equation from coefficient....
added_eq = poly2sym(added_coeff)
OUTPUT:
added_eq =
x^4 + x^3 + x^2 - x - 3
6. CODE:
clear all;close all;clc;
eq1=[0 1 0 -1 3];
eq2=[0 0 1 0 -8];
eq3=[1 0 0 0 2];
r1=conv(eq1,eq2);
prod_coeff=conv(r1,eq3);
multiplied_eq = poly2sym(prod_coeff)
OUTPUT:
multiplied_eq =
x^9 - 9*x^7 + 3*x^6 + 10*x^5 - 24*x^4 - 18*x^3 + 6*x^2 + 16*x -
48
Need these done on matlab 4. (10%) Given the roots (.--2, x-3.x-8), reconstruct the corresponding polynomial...
1a): Find the roots of the following polynomial equations using matlab: f(x) = x^5 − 9x^4 + 31x^3 − 51x^2 + 40x − 12 f(x) = x^5 − 11x^4 + 47x^3 − 97x^2 + 96x − 36 b): Find the coefficients of two polynomial equations in matlab given the following sets of roots: r1 = [ 100 25 50 5 10 ] r2 = [ 11 22 33 0 55 ] c): Create a figure with four subplots, each showing...
3) Write a polynomial f(x) that meets the given conditions. Answers may vary. 3) Degree 2 polynomial with zeros 212 and -222 A) S(x) = x2 + 472x+8 B) f(x) = x2-8 9 S(x) = x² + 8 D) S(x) = x2-11/2x+8 4) Degree 3 polynomial with zeros 6, 21, and -2i A) S(x) => x3 + 6x2 + 4x + 24 f(x)= x2 - 6x2 + 4x - 24 B) /(x) = x2 - 6x2 - 4x + 24...
1) Using Matlab, find all real and complex roots of the following polynomial equation: (x-1)(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)=8 2) Using Matlab, find the root for the following system of equations. Both x and y are positive. a: (x^2)cos(y)=1 b: e^(-4x)+1
Problem Six: Given two polynomials: g(x) = anx" + an-iz"-1 +--+ aix + ao Write a MATLAB function (name it polyadd) to add the two polynomials and returns a polynomial t(x) = g(x) + h(x), whether m = n, m < n or m > n. Polynomials are added by adding the coefficients of the terms with same power. Represent the polynomials as vectors of coefficients. Hence, the input to the function are the vectors: g=[an an-1 ao] and h=[am...
solve these questions by Matlab 10 9:17 X ull ** - STC Report Lab - للقراءة فقط (1) 28 Hoď → 7 سجل دخولك لتحرير الملف وحفظ التغييرات ا... Problems Problem 1: The following polynomials are given: Py(x) = x + 2x4 - 3x + 7x2 - 8x + 7 Polx) = x + 3x - 5x2 + 9x + 11 P3(x) = x - 2x - 3x +9 P4(x)=x2-5x + 13 Ps(x) = x + 5 Use MATLAB functions...
Please solve it in MATLAB 6) Interpolation and plot: y=x*; x=0:5; a) Interpolate: x1= 1.5; x2=2.5; x3=3.5 b) Plot x and y and label axis. 7)- A= [1,2;3,4); B= [5,6;7,8] Using MATLAB find the following: A+B; A-B; AB, A/B, A-1,B-1, A.B, A./B 8). Using MATLAB: F(x) = y=x+- 2x2 + 3x – 4 a) find the roots of the polynomial f(x) b) find the integral of the polynomial f(x) c) find the SS(x)dx.
Throughout this question, fix A as an n×n matrix. If f(x) is a polynomial, then f(A) is the expression formed by replacing every x in f(x) with A and inserting the n×n identity matrix I to its constant term. For example, if f(x) = x2 −2x+5 (whose degree is 2), then f(A) = A2 −2A+5I; if f(x) = −x3 +2 (whose degree is 3), then f(A) = −A3 + 2I. (a) Using induction of the degree of the polynomial f(x),...
How can I code this problem in MATLAB: a) Find the approximations to within 10-4 to all real zeros of the following polynomials using Newton's method.? f(x)=x3 - 2*x2- 5. b) Find approximations to within 10-5 to all the zeros of each of the following polynomials by first finding the real zeros using Newton’s method and then reducing to polynomials of lower degree to determine any complex zeros. f(x)=x4 + 5x3 - 9*x2 - 85*x - 136.
Write the polynomial function that passes through the point (-4, -40) and has roots of x--2,x3, and x 6.
0 4 -1 1 5. Given, A--2 6 -11 L-2 8-3 1 has the characteristic polynomial p(λ)-(x + 2) (z-2)2(z-1) Find the corresponding eigenvector for each eigenvalue 0 4 -1 1 5. Given, A--2 6 -11 L-2 8-3 1 has the characteristic polynomial p(λ)-(x + 2) (z-2)2(z-1) Find the corresponding eigenvector for each eigenvalue