How to integral a composite function in yalmip?

sdpvar x1 x2 x3 u1
% syms x1 x2 x3 u1
d=x1+x2;
y=x1+x2+u1+d;
z=y+3;
t=int(z,y,0,y)
hello everyone...I have define a integration by yalmip, but there are some error..
If replace by syms, there are still errors.
Could you please help me find the mistakes? THANKS.

 채택된 답변

infinity
infinity 2019년 7월 13일

0 개 추천

Hello,
You define z as a function of x1, x2, and u1. But, you apply the integral function to compute the integral of z over the interval [0, y] and told the integral function that the variable of z is also y. It is not correct.
Let image that what you are doing like trying to compute

댓글 수: 3

Tong Liu
Tong Liu 2019년 7월 15일
Thank you for your answer. As you know, z is also a function of y. Why can't I intergral according to y directly? Is that only the final variable like x and u can be used for integration?
Thanks!
Hello,
In case, we have function z(y) = y + 3 then we can compute the integral of z with respect to y as simple by
syms y a
z = y + 3;
res = int(z,y,0,a)
where "a" is upper limit of the integral.
But, in your given code, you defined z as function of x1, x2, u1 and parameter d. Matlab can not understand that z is a function y.
Tong Liu
Tong Liu 2019년 7월 15일
Get it. Thank you for your kindly help!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Thermal Analysis에 대해 자세히 알아보기

질문:

2019년 7월 13일

댓글:

2019년 7월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by