Display a matrix in terms of other matrices
Mostrar comentarios más antiguos
Hello,
I have a 5x5 matrix A and a large matrix containing say B = [A;A^2;A^3.....A^n]. I want to display this B matrix in form of A's. If I print B, it gives me a large matrix with numbers in it. I want it to be displayed in terms of A, A^2, A^3 and so on.
How can I do that in matlab?
Thank you, Salman Hafeez
Respuestas (1)
Azzi Abdelmalek
el 28 de Jul. de 2014
n=10
B =['[' sprintf( 'A^%d ',1:n) ']']
2 comentarios
Salman
el 28 de Jul. de 2014
Azzi Abdelmalek
el 28 de Jul. de 2014
You can use symbolic variables
syms A B C D
X = [A A^2 A^3]
Categorías
Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!