Error: Function definitions are not permitted in this context.
이전 댓글 표시
I am not able to use function as all in my code, I am confused now that is using because I am suing R2015b version? Do I need to buy the toolbox ?
채택된 답변
추가 답변 (2개)
Nishaben Desai
2019년 6월 19일
댓글 수: 2
Walter Roberson
2019년 6월 19일
No, you cannot run that code without having the symbolic toolbox.
You would have to numeric methods, such as using ode45(). That would not, however, give you the equation of the result.
Nishaben Desai
2019년 6월 19일
Nishaben Desai
2019년 6월 19일
0 개 추천
댓글 수: 2
Walter Roberson
2019년 6월 19일
If U is an unknown variable and dy/dt = u - y and presuming that U and u are the same thing, then you have three values to be concerned with: t, y(t), and u
If u is a constant, then integrating dy/dt = u - y on both sides, we get y = u*t - 1/2*y^2 + C for some boundary condition value C. y(0) = 0 tells us that u*0 + 1/2*0^2 + C = 0 which tells us that C = 0, so y = u*t - 1/2*y^2 which gives us that 1/2*y^2 + y - u*t = 0 which gives us that y = sqrt(2*t*u + 1) - 1 . We know this must stay in the range 0 to 90, and by examination we can see that it is largest when u is largest, so we can solve 90 == sqrt(2*t*u + 1) - 1 which would give us u = 4140/t . But time is potentially unlimited and this is not a constant in time.
From this we conclude that either u is not a constant or else time for the system is not unlimited.
Either way, we do not have enough information to determine u .
Nishaben Desai
2019년 6월 19일
편집: Nishaben Desai
2019년 6월 19일
카테고리
도움말 센터 및 File Exchange에서 Special Values에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!