Arrays have incompatible sizes for this operation.

5 ビュー (過去 30 日間)
Amirul Azmi
Amirul Azmi 2022 年 11 月 21 日
回答済み: cr 2022 年 11 月 21 日
u=@(t) t>0;
h12 = conv(h1,h2);
ht= h1+h12;
% Plot out h1*h2
subplot(1, 1,1 );
plot(t,ht, 'b-', 'LineWidth', 2); % Just plot vs. index.
grid on;
title('Signal h(t)');
xlabel('time', 'FontSize', 12);
ylabel('amplitude h(t)', 'FontSize', 12);

回答 (1 件)

cr 2022 年 11 月 21 日
Try the following change in conv() call on line 5.
h12 = conv(h1,h2,'same');

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by