Suppose i have a matrix (2x4) A=[1 2 3 4;5 6 7 8] and i want to change it into this matrix [1 2;3 4;5 6;7 8]. How to do that?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Payel
el 17 de Jun. de 2023
Respondida: Image Analyst
el 17 de Jun. de 2023
A= [1 2 3 4;5 6 7 8]
Output needed
B= [1 2;3 4;5 6;7 8]
0 comentarios
Respuesta aceptada
Más respuestas (2)
John D'Errico
el 17 de Jun. de 2023
Editada: John D'Errico
el 17 de Jun. de 2023
help transpose
help reshape
Essentially, you need to learn how elements are stored in a matrix. You need to learn to manipulate the shapes of the matrices you will work with. If you don't understand this, well, then it is time to learn!
0 comentarios
Image Analyst
el 17 de Jun. de 2023
@Payel this is super basic. You're not going to get very far, very fast if you have to ask Answers volunteers every time you want to do something as simple as this. You need to learn it yourself.
To learn other fundamental concepts, invest a quick 2 hours of your time here:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1413734/image.png)
0 comentarios
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!