Varying input into a transfer function in simulink
이전 댓글 표시
I want to vary a constant inside a transfer function in simulink. For example the transfer function could be: 1/(AS+1) where A is the varying constant. Then I want it to store the ouptut of each value in an array.
I tried doing this in Matlab with the following code:
G = zeros(10,2);
for i = 1:1:10
A = i;
out = sim('');
values1 = out.simout.values(:,1);
values2 = out.simout.values(:,2);
G = values2.*values1;
end
However, this code does not store every value of G that is calculated, and does not allow for A to be non integer values like i = 1:0.01:10.
Is there any way to do this?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!