function of the following
조회 수: 1 (최근 30일)
이전 댓글 표시
function:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/900820/image.png)
time constants :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/900825/image.png)
댓글 수: 0
채택된 답변
Image Analyst
2022년 2월 20일
Try this:
tau = [1, 0.5, 0.1];
for k = 1 : length(tau)
t = linspace(0, 5 * tau(k), 1000);
f = exp(-t / tau(k));
subplot(3, 1, k);
plot(t, f, 'b-', 'LineWidth', 2);
caption = sprintf('Tau = %.1f', tau(k));
title(caption);
grid on;
xlabel('t');
ylabel('f');
end
댓글 수: 2
Image Analyst
2022년 2월 20일
tau = [1, 0.5, 0.1];
for k = 1 : length(tau)
t = linspace(0, 5 * tau(k), 1000);
f = exp(-t / tau(k));
plot(t, f, '-', 'LineWidth', 4);
hold on;
caption = sprintf('f vs t');
title(caption, 'FontSize', 20);
grid on;
xlabel('t', 'FontSize', 20);
ylabel('f', 'FontSize', 20);
end
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!