Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Cancel
5
  • 1
    Please improve your question. It is not clear what you are asking, the question is badly formatted and the code is spread out across different parts. Please provide a clear, concise minimum example and ask a clear question. As a note: punctuation helps, I had trouble reading your question as it was not always clear where a new sentence started etc.
    – pschulz
    Commented Apr 4, 2024 at 16:51
  • "I cannot run the sum in the parenthesis of the output for sola due to dimensionality issues" -- could you please post the full error message you get? I don't have the symbolic toolbox available right now, so cannot run the code to see what you're seeing. Commented Apr 4, 2024 at 21:52
  • @CrisLuengo sola = l.'*(symmatrix(eye(2)) .* A*g + kron(phi.', A*g)). Now, symmatrix(eye(2)) .* A*g , is a 2x1 matrix and kron(phi.', A*g) is a 2x2 matrix therefore if i run (symmatrix(eye(2)) .* A*g + kron(phi.', A*g)), I get the following error: "Error using symbolic.mixin.symbolicmatrix/engineHelperWrapper - Dimensions do not match." Which makes sense as I cannot sum a vector and a matrix. Commented Apr 5, 2024 at 10:14
  • @CrisLuengo On the other hand, if I replace A*g which is a 2x1 vector with item which is another 2x1 vector having as elements i, I get l.'*(kron(phi.', A*g) + symmatrix(eye(2)) .* i) where both of the addenda are 2x2 matrices and can therefore be summed. Commented Apr 5, 2024 at 10:15
  • So you found a bug? What do you expect the community here to do? You can report bugs to the MathWorks: supportcases.mathworks.com/mwsupport/s/… — check for existing bug here first: mathworks.com/support/bugreports Commented Apr 5, 2024 at 13:45