graphics - -')text(0.1,0.80,'y_2 = sin(x)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% Appendix A: MATLAB Basics, Section A.4%% MATLAB graphics described in Section A.4 % includes Figures A.18 - A.20. After each subtopic, a % pause is inserted to allow you to inspect the output. Hit % the space bar (or any other key) to continue to the next % subtopic.%clearformathold offclg% -------------- Figure A.18x=[0:0.1:1]';y=x.*sin(x);plot(x,y)title('Figure A.18: Plot of x sin(x) vs x')xlabel('x')ylabel('y')grid onpause%% -------------- Figure A.19x=[0:0.1:1]'; y1=x.*sin(x); y2=sin(x);plot(x,y1,'--',x,y2,'-.')text(0.1,0.85,'y_1 = x sin(x) - -
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: -')text(0.1,0.80,'y_2 = sin(x) ._._')xlabel('x')ylabel('y_1 and y_2')title('Figure A.19')gridpause %% -------------- Figure A.20dx=[0:0.1:1]';y1=x.*sin(x); y2=sin(x); subplot(2,2,1),plot(x,y1,'--',x,y2,'-.')title('Figure A.20a: subplot(2,2,1)') subplot(2,2,2),plot(x,y1,'--',x,y2,'-.')title('Figure A.20b: subplot(2,2,2)') subplot(2,2,3),plot(x,y1,'--',x,y2,'-.')title('Figure A.20c: subplot(2,2,3)') subplot(2,2,4),plot(x,y1,'--',x,y2,'-.')title('Figure A.20d: subplot(2,2,4)')...
View Full Document

This note was uploaded on 12/01/2009 for the course Q q taught by Professor Q during the Spring '09 term at Universidad Autonoma de Nuevo Leon - School of Business.

Ask a homework question - tutors are online