matlab exam 2 - b = coeff(2); c = coeff(3); x1 = (-b +

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

View Full Document Right Arrow Icon
epsilon=8.854e-12; d = input('enter d in meters') L = input('enter L in meters') r = input('enter r in meters') C = pi*epsilon*L./log((d-r)./r); disp('the capacitance in farads is: ) disp(C) load filename.txt A = filename; mean(A) A=xlsread('filename') A= blah S = sum(A) S = blah disp('enter coefficients in brackets seperated by commas, highest power first') coeff = input('enter the three coefficients') a = coeff(1);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b = coeff(2); c = coeff(3); x1 = (-b + sqrt(b^2-4*a*c))/(2*a); x2 = (-b - sqrt(b^2-4*a*c))/(2*a); disp('first real part') disp(real(x1)) disp('first imaginary part') disp(imag(x1)) disp('second real part') disp(real(x2)) disp('second imaginary part') disp(imag(x2)) price_A=[values]; price_B=[values]; length(find(price_A>price_B) ans = days price a was above price b...
View Full Document

This note was uploaded on 04/02/2008 for the course ENGINEERIN 127 taught by Professor Finch during the Spring '08 term at Rutgers.

Ask a homework question - tutors are online