why putting a variable in a matrix divide it?

When I try to put a variable in the matrix the matrix devide it self into two matrix and I want to be one
please help

Respuestas (1)

Matt J
Matt J el 18 de Dic. de 2023
Editada: Matt J el 18 de Dic. de 2023
It is a 2x2 matrix, even though you might not like how it gets rendered in the Command Window. If it were not really a 2x2 matrix, I would not be able to do matrix operations with it, like below.
syms x
M=[1 x; 0 1]
M = 
M^2
ans = 

1 comentario

Matt J
Matt J el 18 de Dic. de 2023
If you want better rendering of symbolic matrices, work in LiveScript, rather than the Command Window.

Iniciar sesión para comentar.

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

Ali
el 18 de Dic. de 2023

Comentada:

el 18 de Dic. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by