کانال تخصصی متلب: post #2942 — TG.ME

💯مثالی از دستور subplot در متلب

x = -4:0.01:4;
y_cos = cos(x);
y_poly = 1 - x.^2./2 + x.^4./24;

subplot(2,2,1);
plot(x,y_cos,'linewidth',1.25);
title('Subplot 1: Cosine')

subplot(2,2,2);
plot(x,y_poly,'r','linewidth',1.25);
title('Subplot 2: Polynomial')

subplot(2,2,[3,4]);
plot(x,y_cos,'b',x,y_poly,'r','linewidth',1.25);
title('Subplot 3 and 4: Both')
February 27, 2026 1.1K 6