clc;
clear;
close all;
x = 1:100;
y1 = exp(x);
y2 = x.^3;
figure;
subplot(2,2,1)
plot(x,y1,'b',x,y2,'r')
title('Linear Plot')
xlabel('x')
ylabel('y')
legend('e^x','x^3')
grid on
subplot(2,2,2)
loglog(x,y1,'b',x,y2,'r')
title('Log-Log Plot')
xlabel('x')
ylabel('y')
legend('e^x','x^3')
grid on
subplot(2,2,3)
semilogx(x,y1,'b',x,y2,'r')
title('Semilog-X Plot')
xlabel('x')
ylabel('y')
legend('e^x','x^3')
grid on
subplot(2,2,4)
semilogy(x,y1,'b',x,y2,'r')
title('Semilog-Y Plot')
xlabel('x')
ylabel('y')
legend('e^x','x^3')
grid on
To embed this project on your website, copy the following code and paste it into your website's HTML: