Can anyone help?

1 visualización (últimos 30 días)
Haoyu Zhu
Haoyu Zhu el 17 de Mzo. de 2021
Respondida: James Tursa el 17 de Mzo. de 2021
Don't know how to generate the A matrix, can someone help and explain this?
Thank you!
  2 comentarios
James Tursa
James Tursa el 17 de Mzo. de 2021
What have you done so far? What specific problems are you having with your code? You might want to look at the .^ operator for this ... it will be easy to generate A in one simple expression.
Haoyu Zhu
Haoyu Zhu el 17 de Mzo. de 2021
Hi, I just don't know how to start because I'm still learning how to do linear algebra via MATHLAB, is it possible that you can provide some example? Thanks!

Iniciar sesión para comentar.

Respuestas (1)

James Tursa
James Tursa el 17 de Mzo. de 2021
Hint: Look at the results of this operation, and I think you can figure it out from there:
x = [2;3;4]; % column vector
y = 0:5; % row vector
x .^ y

Categorías

Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by