wed_lec_morning - %% clear,clc % semilogx, semilogy, loglog...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
%% clear,clc figure(1) t = linspace(0,1,51); v1 = 20*t.*exp(-10*t); v2 = 10*t.*exp(-5*t); plot(t,v1,'r:',t,v2) %legend('v1','v2') %axis([min(t)-0.1 max(t)+0.1 min(v1)-0.1 max(v1)]) %xlim([min(t)-0.1 max(t)+0.1]) ylim([min(v1)-0.1 max(v1)]) %grid on title('v = 20te^{-10t}') xlabel('t'),ylabel('v') [x,y] = ginput(1); %text(x,y,'HERE!') plottext = [num2str(x),',',num2str(y)]; text(x,y,plottext,'fontweight','bold') %% figure(2) fplot('sin(x)',[0 2*pi]) figure(3) ezplot('cos(x)',[-2*pi 2*pi]) %% clear,clc t = linspace(0,1),51; v1 = 20*t.*exp(-10*t); v2 = 10*t.*exp(-5*t); subplot(2,3,1) plot(t,v1,'r:','linewidth',2) xlabel('t'),ylabel('v') subplot(2,3,3) plot(t,v2,'--','linewidth',2) xlabel('t'),ylabel('v')
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %% clear,clc % semilogx, semilogy, loglog time = linspace(0,10,200); data = exp(-time); subplot(2,2,1) plot(time,data) title('Original') grid on subplot(2,2,2) semilogx(time,data,'r') title('LogX') grid on subplot(2,2,3) semilogy(time,data,'r--','linewidth',2) title('LogY') grid on subplot(2,2,4) loglog(time,data,'k:','linewidth',2) title('LogXLogY') grid on %% clear,clc x = [2 4 5 7 8]; bar(x) %% clear,clc x = linspace(0,10*pi,100); y = cos(x); z = sin(x); plot3(x,y,z) %% clear,clc range = -2:0.1:2; [x,y] = meshgrid(range); z = x.^2 - y.^2; subplot(2,1,1) mesh(x,y,z) subplot(2,1,2) surf(x,y,z)...
View Full Document

This note was uploaded on 03/30/2011 for the course ENGINEERIN 127 taught by Professor Finch during the Spring '08 term at Rutgers.

Page1 / 2

wed_lec_morning - %% clear,clc % semilogx, semilogy, loglog...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online