matlab exam 2 prep

matlab exam 2 prep - matlab exam 2 prep.oo3 Topic functions...

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

View Full Document Right Arrow Icon
matlab exam 2 prep.oo3 Topic functions and Fles 1 141-162 3.1 elementary mathematical functions lookfor ex. lookfor imaginary to get a list of functions that deal with imaginary numbers exponential and logarithmic functions exponential exp(x) exponential; e^x sqrt(x) square root; x^(1/2) logarithmic log(x) natural logarithm; ln(x) log10(x) common (base 10) logarithm; log x = log[10] x complex abs(x) absolute value; x angle(x) angle of a complex number x conj(x) complex conjugate imag(x) imaginary part of a complex number x real(x) real part of a complex number x numeric ceil(x) round to the nearest integer toward Fx(x) round to the nearest integer toward 0 ±oor(x) round to the nearest integer towards - sign(x) signum function (+1 if x > 0; 0 if x = 0; -1 if x <0) complex number functions numeric functions trigonometric functions trigonometric cos(x) cot(x) csc(x) sec(x) sin(x) tan(x) inverse trigonometric acos(x)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Topic acot(x) acsc(x) asec(x) asin(x) atan(x) atan2(x,y) four quadrant inverse tangent hyperbolic functions cosh x = (e^x + e^-x) / 2 sinh x = (e^x - e^-x) / 2 sinh^-1 = ln(x + (x^2 + 1)^(1/2)) hyperbolic cosh(x) coth(x) csch(x) sech(x) sinh(x) tanh(x) inverse hyperbolic acosh(x) acoth(x) acsch(x) asech(x) asinh(x) atanh(x) 3.2 user-deFned functions function [output variables] = function_name(input variables) function deFnition line variants function [area_square] = square(side); square.m function area_square = square(side); square.m function [volume_box] = box(height, width, length); box.m function [area_circle, circumf] = circle(radius); circle.m function sqplot(side); sqplot.m variations in function calls function arguments local variables global variables applications Fnding the zeroes of a function
Background image of page 2
Topic minimizing a function of one variable minimizing a function of several variables design optimization problems 4, 6, 9, 12, 14, 16 (178-180) 4 for several values of x, use matlab to conFrm that sinh x = (e^x-e^-x)/2 6 the capacitance of two paralell conductors of length L and radius r, separated by a distance d in the air, is given by C = ( π (permittivity)L)/ln((d-r)/r) permittivity = 8.854*10^-12 ±/m write a script Fle that accepts user input for d, l, and r, and computes and displays C. test the Fle with the values L=1m, r=0.001m, and d=0.004m 9 write a function that accepts input in degrees ± and computes the corresponding values in degrees C the relation between the two is CºT = (5/9)(Tº±-32) 12 a fence around a Feld is shaped as shown in Fgure p12 (p179). it
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

matlab exam 2 prep - matlab exam 2 prep.oo3 Topic functions...

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

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