Solving a matrix with symbolic equations

Hello
I want to simplify a matrix equation
syms r y Q u R phi f1 f0 xk xk_1
y= f1*xk - f0* xk_1 + phi *u
simplify((r-y)'*Q*(r-y) + u'*R*u)
where all variables are vectors exept R Q phi are matrixes
any help?
please

3 comentarios

Torsten
Torsten el 5 de Abr. de 2023
Depends on what you mean by "simplify". I wouldn't call it simpler than the expression (r-y)'*Q*(r-y) + u'*R*u if you expand the matrix-vector products.
Husam
Husam el 5 de Abr. de 2023
thanx
I want to solve
this equation
j=(r-f1*xk - f0* xk_1 + phi *u )'*Q*(r-f1*xk - f0* xk_1 + phi *u ) + u'*R*u
and then find the derivatives for : u
Torsten
Torsten el 5 de Abr. de 2023
Editada: Torsten el 5 de Abr. de 2023
You say all variables are vectors. So what does f1*xk, f0*xk_1 and phi*u mean if all these variables are vectors ? Elementwise multiplication ?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 5 de Abr. de 2023

Editada:

el 5 de Abr. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by