Create a single MATLAB script file to create a single MATLAB
Create a single MATLAB script file to create a single MATLAB figure with 4 subplots . Label your graphs !
Subplot #1
A graph of e^(x/360) sin(2x+42) and ln(x+400)cos(-3x-85) over the range of -360 degrees to 360 degrees .
Solution
clear all
clc
%%
% Initialize the variables:
x=-360:1:360; % in degrees
y1=exp(x/360).*sin((2*x+42)*(pi/180)); % here we multiplied by pi/180 so as to convert
% degress in radians.
y2=log2(x+400).*cos((-3*x-85)*(pi/180));
%%
subplot (2,2,1,\'FontWeight\',\'bold\',\'FontSize\',11,...
\'FontName\',\'Times\')
plot(x,y1,\'LineWidth\',2)
% Create xlabel
xlabel(\'x\',\'FontWeight\',\'bold\',\'FontSize\',14,\'FontName\',\'Times\');
% Create ylabel
ylabel(\'exp^{x/360} sin(2x+42)\',\'FontWeight\',\'bold\',\'FontSize\',14,...
\'FontName\',\'Times\');
title (\'Plot exp^{x/360} sin(2x+42)\',\'FontWeight\',\'bold\',\'FontSize\',14,...
\'FontName\',\'Times\');
%%
subplot (2,2,2,\'FontWeight\',\'bold\',\'FontSize\',11,...
\'FontName\',\'Times\')
plot(x,y1,\'LineWidth\',2)
% Create xlabel
xlabel(\'x\',\'FontWeight\',\'bold\',\'FontSize\',14,\'FontName\',\'Times\');
% Create ylabel
ylabel(\'ln(x+400)cos(-3x-85)\',\'FontWeight\',\'bold\',\'FontSize\',14,...
\'FontName\',\'Times\');
title (\'Plot ln(x+400)cos(-3x-85)\',\'FontWeight\',\'bold\',\'FontSize\',14,...
\'FontName\',\'Times\');
%%
subplot(2,2,3)
%%
subplot(2,2,4)
