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

Torsten
Torsten 2023년 4월 5일
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 2023년 4월 5일
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 2023년 4월 5일
편집: Torsten 2023년 4월 5일
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 ?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

2023년 4월 5일

편집:

2023년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by