![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/452813/image.png)
How to input a vector in Simulink with initial values to ultimately plot it over time?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have initial vector x0 = [12;7,57] With x(0)=x0 I want to plot the changes x makes over time t and time steps k with x'(t) = A*x(t) And x(k+1)=A*x(k)
What would be the best way to integrate x0 as initial value? By means of a constant block, or as initial value of integrator? Or anything else?
댓글 수: 0
채택된 답변
Paul
2020년 12월 8일
편집: Paul
2020년 12월 8일
Define x0 and A in the matlab workspace. Here is the block diagram. Make sure to select matrix multiply for the gain blocks. Define x0 as the Initial Condition parameter for the integrator block (shown here) and also for the Delay block. Set the Sample Time parameter in the delay block to the appropriate value for your problem. Keep in mind that, in general, the continuous output and the discrete output will be very different when using the same A matrix for the feeback gain.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/452813/image.png)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Model Verification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!