Question: MATHLAB Create a script plot _ fav.m to plot your favorite non - polynomial ( and non - constant ) function. You can use the

MATHLAB Create a script plot_fav.m to plot your favorite non-polynomial (and non-constant) function. You can use the code in the primer as a starting point. Submit your script
file to Canvas Homework 1 assignment page.
starter:
x =[02468]; % basic plotting
plot( x );
plot( x,2*x );
axis([0808]);
x = pi*[-24:24]/24;
plot( x, sin(x));
xlabel( 'radians' );
ylabel( 'sin value' );
title( 'dummy' );
gtext( 'put cursor where you want text and press mouse' );
figure; % multiple functions in separate graphs
subplot(1,2,1);
plot( x, sin(x));
axis square;
subplot(1,2,2);
plot( x,2.*cos(x));
axis square;
figure; % multiple functions in single graph
plot( x,sin(x));
hold on; % hold on tells matlab to write on top
plot (x,2.*cos(x),'--', 'Linewidth', 2); % of the current plot
legend( 'sin', 'cos' );
hold off;
xlabel( 'radians' , 'Fontsize', 16); % add formatting options
ylabel( 'sin value' , 'Fontsize', 16);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!