solution17

solution17 - TT=linspace(273,400,20);...

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

View Full Document Right Arrow Icon
% Assignment 17 % Prob 1 t=linspace(0,8*pi,300); x=(8*pi-t).*cos(2*t); y=(8*pi-t).*sin(2*t); z=0.5*t; plot3(x,y,z) % length of string of lights, s % s=integral(ds) % ds=sqrt(dx^2+dy^2+dz^2) % dx=d((8*pi-t).*cos(2*t)) % dy=d((8*pi-t).*sin(2*t)) % dz=d(0.5*t) % find dx, dy and dz in terms of dt and substitute them into the equation % for ds. % ds=(sqrt((-cos(2*t)-2*(8*pi-t).*sin(2*t))^2+(-sin(2*t)+2*(8*pi-t).*cos(2*t % ))^2 +0.25))*dt % Use 'quad' to find the integral s=quad('sqrt((-cos(2*t)-2*(8*pi-t).*sin(2*t)).^2+(-sin(2*t)+2*(8*pi-t).*cos(2*t )).^2 +0.25)',0,8*pi) s = 633.2169
Background image of page 1

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

View Full DocumentRight Arrow Icon
% Prob 2 % mesh plot vv=linspace(1.3,3.2,10);
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: TT=linspace(273,400,20); [v,T]=meshgrid(vv,TT); P=0.287*T./v; mesh(v,T,P) xlabel('v'),ylabel('T'),zlabel('P') % surf plot vv=linspace(1.3,3.2,10); TT=linspace(273,400,20); [v,T]=meshgrid(vv,TT); P=0.287*T./v; surf(v,T,P) xlabel('v'),ylabel('T'),zlabel('P') % contour plot vv=linspace(1.3,3.2,10); TT=linspace(273,400,20); [v,T]=meshgrid(vv,TT); P=0.287*T./v; contour(v,T,P) xlabel('v'),ylabel('T'),zlabel('P') Prob. 3 syms x y z y=(x-1)*(x^2+5)+3*x^2+2*x; y=collect(y) y = -5+x^3+2*x^2+7*x % Prob 4 syms x a % (a) solve(3*x^2-2*x+5) % (b) solve(x^2+sqrt(x-a),a) ans = 1/3+1/3*i*14^(1/2) 1/3-1/3*i*14^(1/2) x-x^4...
View Full Document

This note was uploaded on 02/27/2010 for the course ENME 271 taught by Professor Marks during the Summer '08 term at Maryland.

Page1 / 3

solution17 - TT=linspace(273,400,20);...

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

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