1 / 5

Introduction to MATLAB

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 logarithm (log e (x)) log10(x) – base 10 logarithm (log 10 (x)) sqrt (x) – square root (√x) abs(x) – absolute value (|x |).

leyna
Télécharger la présentation

Introduction to MATLAB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 (ex) • log(x) – natural logarithm (loge(x)) • log10(x) – base 10 logarithm (log10(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

  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

More Related