clc
clear

x=linspace(1,100,1000);
f1=exp(x);
f2=x.^3;

figure;

subplot(2,2,1)
plot(x,f1,'r',x,f2,'b')
title('Linear Scale')
xlabel('x')
ylabel('y')
legend('e^x','x^3')
grid on

subplot(2,2,2)
loglog(x,f1,'r',x,f2,'b')
title('Log-Log Scale')
xlabel('x')
ylabel('y')
legend('e^x','x^3')
grid on

subplot(2,2,3)
semilogx(x,f1,'r',x,f2,'b')
title('Semilog-x Scale')
xlabel('x')
ylabel('y')
legend('e^x','x^3')
grid on

subplot(2,2,4)
semilogy(x,f1,'r',x,f2,'b')
title('Semilog-y Scale')
xlabel('x')
ylabel('y')
legend('e^x','x^3')
grid on

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: