ureal function in the Robust Control Toolbox
조회 수: 9 (최근 30일)
이전 댓글 표시
Hi,
TLDR: How to get MATLAB to plot the responses for all the uncertain models generated (using the ureal function) for a sinusoidal input?
I am trying to model an uncertain spring mass damper system. The uncertainitites have been introudced in the following way:
um = ureal('m',3,'Percentage',10);
ub = ureal('c',1,'Percentage',10);
uk = ureal('k',2,'Percentage',10);
H is the Plant model, and I'm trying to determine its output response to different inputs in the following way:
impulse(H);
step(H);
And I get multiple graphs (20 different plots) for the different values of m, b, k for the step response as shown:

Same is the case for the impulse response. However, when I try to simulate the response to a sinusoidal input, only one plot is shown. How do I make MATLAB plot the responses of all uncertain systems that MATLAB has generated in a single graph like its doing automatically for the step response? I'm using the following code to plot the sinusoidal response:
t1 = linspace(0, 50, 1000);% Time Vector
u1 = 1*sin(10*t1); % Forcing Function
y1 = lsim(H, u1, t1); % Calculate System Response
plot(t1, y1);
title('response to 1*sin(10*t1) v t');
xlabel('t');
ylabel('sinusoidal response');
Thank you!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Uncertain Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!