Filter löschen
Filter löschen

Evaluate the value of the matrix polynomial 2x^2 + 3x+ 4, given that the square matrix is x = [1 -3 2; 5 1 8; 6 4 3].

1 Ansicht (letzte 30 Tage)
Evaluate the value of the matrix polynomial 2x^2 + 3x+ 4, given that the square matrix is x = [1 -3 2; 5 1 8; 6 4 3].
  1 Kommentar
Steven Lord
Steven Lord am 13 Dez. 2021
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
If this is not a homework assignment just use the polyvalm function.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Eswaramoorthy
Eswaramoorthy am 1 Mär. 2023
Bearbeitet: Eswaramoorthy am 1 Mär. 2023
Hi,
You can use the 'polyval' or 'polyvalm' function.
% Define the matrix x
x = [1 -3 2; 5 1 8; 6 4 3];
% Define the coefficients of the matrix polynomial
c = [2 3 4];
% Use the polyvalm function to evaluate the matrix polynomial
y = polyval(c, x);
% Display the result
y
Output:
y = 3×3
9 13 18
69 9 156
94 48 31
For more info on polvalm function, refer documentation:
Hope this helps!

Kategorien

Mehr zu Polynomials finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by