Error using * Inner matrix dimensions must agree.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
houssem alimi
el 17 de En. de 2019
Comentada: Walter Roberson
el 18 de En. de 2019
error in matrix
7 comentarios
Walter Roberson
el 18 de En. de 2019
dbstop if error
run the code. when it stops look at the sizes of all of the variables involved and extract portions of the expression until you figure out which multiplication is triggering the error and what the sizes are of the left and right. Then you trace backwards in the code to figure out why they got to be that size.
Respuesta aceptada
madhan ravi
el 17 de En. de 2019
Editada: madhan ravi
el 17 de En. de 2019
Use size() to check the sizes of the variables if they have compatible sizes ( https://www.mathworks.com/help/matlab/matlab_prog/compatible-array-sizes-for-basic-operations.html#responsive_offcanvas ) .
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements 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!