Matrix dimensions must agree Error
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I get the matrix dimmensions must agree error for the following code.
Can someone tell me how to fix?
B=[m2ag2x;m2ag2y;F32x;m3ag3x;m3ag3y;Mfp;m4ag4x;0]
A=[1 0 1 0 0 0 0 0
0 1 0 1 0 0 0 0
-R12y R12x -R32y R32x 0 0 0 1
0 0 -1 0 1 0 0 0
0 0 0 -1 0 1 0 0
0 0 R23y -R23x -R43y R43x 0 0
0 0 0 0 -1 0 mu 0
0 0 0 0 0 -1 1 0]
F=A/B
0 comentarios
Respuestas (1)
Daniel M
el 16 de Nov. de 2019
Editada: Daniel M
el 16 de Nov. de 2019
A is [8x8] and B is [8x1]. Do you mean to do the mrdivide operation, "/"? Or do you mean to do element-wise division "./"? If the former, do
F = A/B.'; % F is [8x1]
If the latter do
F = A./B; % F is [8x8]
1 comentario
Walter Roberson
el 16 de Nov. de 2019
This is one of the rare cases where A/B' is apparently more correct than A/B.'
I have a hard time following why you use conjugate transpose in these kinds of calculations instead of plain transpose, but I pretty consistently see conjugate transpose used for this situation. Because I do not understand it, I cannot describe why you would or would not want to use conjugate for this situation.
.' compared to ' only makes a difference if some of the entries are complex valued, though.
Ver también
Categorías
Más información sobre Logical 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!