c1*(c2/u[2]-c3*u[3]-c4)*exp(-c5/u[2])+c6*u[1]
someone can help me?

댓글 수: 5

Torsten
Torsten 2022년 9월 7일
Replace [ ] by ( )
Antonio Itta
Antonio Itta 2022년 9월 7일
Antonio Itta
Antonio Itta 2022년 9월 7일
doesn't work
Torsten
Torsten 2022년 9월 7일
편집: Torsten 2022년 9월 7일
I don't know what Simulink requires. As MATLAB expression, it works for me.
Maybe the unnecessary bracket around u(3) must be deleted.
syms c1 c2 c3 c4 c5 c6
u = [2 4 6]
u = 1×3
2 4 6
c1*(c2/u(2)-c3*(u(3))-c4)*exp(-c5/u(2))+c6*u(1)
ans = 
Star Strider
Star Strider 2022년 9월 7일
If ‘u’ is supposed to be the unit step function, use heaviside or write your own, for example —
u = @(t) t>=0;
Also, it may be necessary to use element-wise operations. See: Array vs. Matrix Operations for details.
.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Formula Manipulation and Simplification에 대해 자세히 알아보기

질문:

2022년 9월 7일

댓글:

2022년 9월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by