Engineering Fundamentals: An Introduction to Engineering, 4th ed.c

(Steven Felgate) #1

462 Chapter 15 MATLAB


In this chapter, we will discuss the use of MATL AB in solving engineering problems.


MATL AB is a mathematical software available in most of the university


computational labs today. MATL AB is a very powerful tool, especially for manipu-


lating matrices; in fact, it originally was designed for that purpose. There are many


good textbooks that discuss the capabilities of MATL AB to solve a full range of prob-


lems. Here, our intent is to introduce only some basic ideas so that you can perform some


essential operations. As you continue your engineering education in other classes, you


will learn more about how to use MATL AB effectively to solve a wide range of engi-


neering problems. As we discussed in Chapter 14, before the introduction of electronic


spreadsheets and mathematical software such as MATL AB, engineers wrote their own


computer programs to solve engineering problems. Even though engineers still write


computer codes to solve complex problems, they take advantage of built-in functions of


softwares that are readily available with computational tools, such as MATL AB.


MATL AB is also versatile enough that you can use it to write your own programs.


This chapter begins by discussing the basic make-up of MATL AB. We will


explain how to input data or a formula in MATL AB and how to carry out some


typical engineering computations. We will also explain the use of MATL AB’s math-


ematical, statistical, and logical functions. Plotting the results of an engineering


analysis using MATL AB is also presented in this chapter. Finally, we will discuss


briefly the curve fitting and symbolic capabilities of MATL AB. Symbolic mathe-


matics refers to the use of symbols rather than numbers to set up problems. Moreover,


we will use examples from Chapter 14 (Excel) to emphasize that MATL AB is just


another tool that you can use to solve a variety of engineering problems.


15.1 MATLAB–Basic Ideas


We begin by explaining some basic ideas; then once you have a good understanding of these
concepts, we will use MATLAB to solve some engineering problems. As is the case with any new
software you explore, MATLAB has its own syntax and terminology. A typical MATLAB win-
dow is shown in Figure 15.1. The main components of the MATLAB window in the default
mode are marked by arrows and numbered, as shown in Figure 15.1.

1.Menu bar: Contains the commands you can use to perform certain tasks, for example, to
save your workspace or to change the View settings.


  1. Current Folder: Shows the active directory, but you can also use it to change the directory.

  2. Current Folder Window: Shows all files, their types, sizes, and descriptions in Current Directory.

  3. Move, Minimize, Resize, or Close a tool: For example, clicking on the ➚ icon will move the
    window outside the desktop.
    5.Command Window: This is where you enter variables and issue MATLAB commands.
    6.Command History Window: Shows the time and the date at which commands were issued
    during the previous MATLAB sessions. It also shows the history of commands in the current
    (active) session.


Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).

圀圀圀⸀夀䄀娀䐀䄀一倀刀䔀匀匀⸀䌀伀䴀圀圀圀⸀夀䄀娀䐀䄀一倀刀䔀匀匀⸀䌀伀䴀

Free download pdf