Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to MATLAB ENGR 1181 MATLAB 1. MATLAB Built-in Math Functions  Pre-defined in MATLAB ready for use exp(x) – exponential (e x ) log(x) – natural.

Similar presentations


Presentation on theme: "Introduction to MATLAB ENGR 1181 MATLAB 1. MATLAB Built-in Math Functions  Pre-defined in MATLAB ready for use exp(x) – exponential (e x ) log(x) – natural."— Presentation transcript:

1 Introduction to MATLAB ENGR 1181 MATLAB 1

2 MATLAB Built-in Math Functions  Pre-defined in MATLAB ready for use exp(x) – exponential (e x ) log(x) – natural logarithm (log e (x)) log10(x)– base 10 logarithm (log 10 (x)) sqrt(x)– square root (√x) abs(x) – absolute value (|x|)

3 Plot Formatting  Title: title('Distance vs. Intensity')  Axis Labels: xlabel('Intensity, w/m^2') ylabel('Distance, m')  Legend: legend('Data Set 1', 'Data Set 2’)

4 Line Specifiers  Allow you to change the type of line and markers on the plot  Refer to your book, or type: help plot for syntax and options Line StyleSpecifierLine Color SpecifierMarker Type Specifier Solid Dotted Dashed Dash-dot - : -- -. Red Green Blue Black rgbkrgbk X-mark Circle Asterisk Point xo*.xo*.

5 Input a String to a Script File  The input() command can also be used for a string input.  The user does not need to know or understand what a string is or what is happening in the code. y = input('text’,’s’) Adding the,’s’ will convert the input to a string


Download ppt "Introduction to MATLAB ENGR 1181 MATLAB 1. MATLAB Built-in Math Functions  Pre-defined in MATLAB ready for use exp(x) – exponential (e x ) log(x) – natural."

Similar presentations


Ads by Google