Effacer les filtres
Effacer les filtres

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 vue (au cours des 30 derniers jours)
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 commentaire
Steven Lord
Steven Lord le 13 Déc 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.

Connectez-vous pour commenter.

Réponses (1)

Eswaramoorthy
Eswaramoorthy le 1 Mar 2023
Modifié(e) : Eswaramoorthy le 1 Mar 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!

Catégories

En savoir plus sur Polynomials dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by