Programming for Chemical Engineers Using C, C++, and MATLAB

Appendix D: Matlab Functions and Commands

Here are some of MATLAB's functions and commands.

MATLAB INPUT/OUTPUT FUNCTIONS AND COMMANDS

  • clc clears the Command Window

  • disp(string) displays an array or string

  • fprintf(string) writes formatted output to the screen

  • input(string) formats input from the steam

  • ; prevents screen printing

  • format numeric display format, expressed together with short, long, e, bank, or +

Matlab Mathematical Functions

  • abs(x) returns the absolute value of x

  • acos(x) returns the arc cosine value of x

  • asin(x) returns the arc sine value of x

  • atan(x) returns the arc tangent value of x

  • ceil(x) returns the rounded value nearest integer toward positive infinity

  • cos(x) returns the cosine value of x

  • exp(x) exponential, returns the value of e raise to the power of x. The constant e (equals 2.71828182845904) is the base of the natural logarithm.

  • floor(x) returns the rounded value of the nearest integer toward negative infinity

  • log(x) returns the natural logarithm of x

  • log10(x) returns the common (base 10) logarithm of x

  • round(x) returns the rounded value of the nearest integer

  • sin(x) returns the sine value of x

  • sqrt(x) returns the square root value of x

  • tan(x) returns the tangent value of x

Polynomial Functions

  • eig() returns the computed eigenvalues of a matrix

  • polyfit() returns the coefficients of the...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: LiDAR Sensors
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.