(************** Content-type: application/mathematica **************
CreatedBy='Mathematica 5.2'
Mathematica-Compatible Notebook
This notebook can be used with any Mathematica-compatible
application, such as Mathematica, MathReader or Publicon. The data
for the notebook starts with the line containing stars above.
To get the notebook into a Mathematica-compatible application, do
one of the following:
* Save the data starting with the line of stars above into a file
with a name ending in .nb, then open the file inside the
application;
* Copy the data starting with the line of stars above to the
clipboard, then use the Paste menu command inside the application.
Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode. Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).
NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing
the word CacheID, otherwise Mathematica-compatible applications may
try to use invalid cache data.
For more information on notebooks and Mathematica-compatible
applications, contact Wolfram Research:
web: http://www.wolfram.com
email: info@wolfram.com
phone: +1-217-398-0700 (U.S.)
Notebook reader applications are available free of charge from
Wolfram Research.
*******************************************************************)
(*CacheID: 232*)
(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[ 9316, 177]*)
(*NotebookOutlinePosition[ 9959, 199]*)
(* CellTagsIndexPosition[ 9915, 195]*)
(*WindowFrame->Normal*)
Notebook[{
Cell[TextData[{
"From ",
StyleBox["Introduction to MATLAB 7 for Engineers",
FontVariations->{"Underline"->True}],
" by William J. Palm III, McGraw-Hill, 2005.\n\nStarting MATLAB\nDouble \
-click on the icon.\n\nMATLAB Desktop\nThree windows:\n1. Command window: to \
communicate with the MATLAB program by typing instructions of various types - \
commands, functions, and statements.\n2. Current Directory window: a file \
management window; access and open files\n3. Command History window: keep \
track of what you have typed; also can be used to repeat program lines by \
clicking and dragginng to Command window or to execute by double clicking.\n\n\
Workspace window at bottom of Current Directory window. Shows all variables \
you have defined in a program and their current value.\n\nYou can manipulate \
the appearance of the Desktop. Enlarge or reduce proportions by dragging \
borders. Eliminate by clicking on the X box. undock from the desktop by \
clicking on the diagonal arrow box.\n\nEntering Commands\nEnter commands \
after the prompt\n>> 8/10\nans =\n\t0.8000\nNote: Default display length is 4 \
decimal places.\nVarious format commands to change display display length and \
format.\n\n5*ans multiplies the previous ans by 5\n\nr=sqrt(110)\n\nVariable \
names must begin with a letter and have fewer than 32 characters. \nThe \
variable speed is different from Speed or sPeed or speed_1.\n\nAssignment \
Operator\nThe = sign is called the ",
StyleBox["assignment",
FontSlant->"Italic"],
" or ",
StyleBox["replacement",
FontSlant->"Italic"],
" operator. x=3 tells MATLAB to assign the value 3 to the varia\\ble x. \
Thus, the left side of an expression must be a single variable, and any \
variables on the right side must have previously defined variables (except \
when using the Symbolic Math toolbox). It is possible to write x=x+3 if x has \
a previously assigned value.\n\nManaging the Work Session\nUse ; to suppress \
the printing of the results of a command to the screen.\nYou can put several \
commands on a line if you separate them by commas (or semicolons).\n\
>>x=2,y=6+x;x=y+7\nx =\n\t2\nx =\n\t15\nTo edit a command use the up arrow to \
scroll up through the previous commands, each of which appears in the Command \
window. When the one you want to edit appears use the left and right arrows \
and Del or Backspace to edit the command. Ctrl and an arrow key moves one \
word at a time; Home to the beginning of the line; End to the end of the \
line. Esc clears the entire line. Ctrl and k \"kills\" the rest of the line.\n\
\nThe command clear clears the values of all variables; clear var1 clears \
only the value of var1.\n\nSpecial Variables and Constants\nDo not use these \
as variable names.\nans\tTemporary variable containing the most recentr \
answer\neps\tSpecifies the accuracy of floating point precision\ni, j\tThe \
imaginary unit ",
Cell[BoxData[
\(TraditionalForm\`\@\(-1\)\)]],
"\nInf\tInfinity\nNaN\tIndicates an undefined numerical result\npi\tThe \
number \[Pi]\n\nMultiple commands on a line can be separated by commas. See \
Table 1.1-3 for commands to manage the work session.\n\nTable 1.1-3\nclc\t\t\
Clears the command window\nclear\t\tRemoves all variables from memory\nclear \
var1 var2\tRemoves the variables var1 and var2 from memory\nexist(\
\[OpenCurlyQuote]name\[CloseCurlyQuote])\tDetermines if a file or variable \
exists having the \[OpenCurlyQuote]name\[CloseCurlyQuote].\nquit\t\tStops \
MATLAB\nwho\t\tLists the variables currently in memory\nwhos\t\tLists the \
current variables and sizes, and indicates if they have \t\t\timaginary parts\
\n:\t\tColon; generates an array having regularly spaced elements\n,\t\t\
Comma; separates elements of an array or multiple commands on a \t\tline\n;\t\
\tSemicolon; suppresses screen printing; also denotes a new row of \t\t\tan \
array.\n\[Ellipsis]\t\tEllipsis; continues what you are doing to the next \
line\n\nComplex Number Operations\nNotice that c1=1-2i is a complex number \
and is interpreted differently than c1=1-2*i.\nIf x=-5+9i and y=6-2i, what \
are:\nx+y\nx*y\nx/y\n\nIn MATLAB, a matrix is a rectangular array of numbers, \
and includes 1-by-1 matrices, which are scalars, and matrices with one row or \
column, which are vectors.\n\nWe can create MATLAB vectors and matrices for a \
variety of purposes.\nFor the position vector ",
StyleBox["p",
FontWeight->"Bold"],
"=5",
StyleBox["i+7j",
FontWeight->"Bold"],
"+2",
StyleBox["k",
FontWeight->"Bold"],
" we write p=[5 7 2] or p=[5,7,2].\nFor a polynomial y=3x",
StyleBox["2",
FontVariations->{"CompatibilityType"->"Superscript"}],
"+4x+7 we write y=[3,4,7] or y=[3,4,7].\nTo solve simultaneous algebraic \
equations 2x+5y=10\n\t\t\t\t\t 5x+7y=0\nusing matrix (determinant) \
methods ",
StyleBox["Ax",
FontWeight->"Bold"],
"=",
StyleBox["b",
FontWeight->"Bold"],
"\nA=[2 5;5 7] and b=[10 0] and y=[2 10;5 0]\nWhich is solved as \
det(y)/det(A)\nNote the use of the semicolon to form the rows of the \
matrices.\n\nScript Files and Programming\nScript files are MATLAB programs \
created by you. Before creating your first MATLAB program you need to set up \
MATLAB so that there is a file path to where you want to save your program. \
The current directory can be displayed by typing the command pwd (i.e. \
present working directory). To change the present working directory, type the \
command cd followed by the new working directory path. For example, suppose \
you will want to save your script file on your memory stick and that that is \
E:/. You can type cd E:/ and strike Enter.\n\nCreating a Script file\nSelect \
",
StyleBox["File",
FontWeight->"Bold"],
"->",
StyleBox["New",
FontWeight->"Bold"],
" or click on the New File icon. The Editor window will appear. % \
indicates a comment. Notice that a script file always has the extension m. \
Type the following program.\n\n%Program example1.m\n%This program computes \
the sine of the square root of\n %the numbers beginning with 5, incremented \
by 2, up to 13.\n x=sqrt([5:2:13])\n y=sin(x)\n \n Save the program by \
selecting File->Save As and type the program name and save the program with a \
.m extension.\n \n If the name of the file appears in the Current Directory, \
you can drag it to the prompt >> in the Command window and it will execute; \
or you can type only the file name after the prompt. To make changes to the \
file, double-click the name of the file in the Current Directory to return to \
the Editor/Debugger. You might want to change this program by adding or \
deleting a semicolon at the end of the sqrt command. To re-execute the \
program in the Command window, you can use the up-arrow to retrieve the \
previously typed file name and press Enter to execute.\n \n Now read Nise \
Chapter 2 through page 44. Then access Appendix B in the back of the book and \
Appendix B from the server or the Nise cd. Make Appendix B the Current \
Directory in MATLAB. Double click on ch2p1 to see the Editor version of the \
problem (or continue to look at the book Appendix B). Type or drag ch2p1 to \
the >> in the Command Window to execute the file. Compare the program to its \
displayed solution. Make sure you understand the solution and its \
presentation. Repeat for ch2p2 through ch2p8.\n \n Read Nise pp 44-48. Access \
Appendix E in the book and/or on the cd. Run ch2sp1 and ch2sp2, making sure \
you understand the program and the problem solution.\n \n "
}], "Text"]
},
FrontEndVersion->"5.2 for Microsoft Windows",
ScreenRectangle->{{0, 1024}, {0, 655}},
WindowSize->{495, 497},
WindowMargins->{{0, Automatic}, {Automatic, 0}}
]
(*******************************************************************
Cached data follows. If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at
the top of the file. The cache data will then be recreated when
you save this file from within Mathematica.
*******************************************************************)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[1754, 51, 7558, 124, 3005, "Text"]
}
]
*)
(*******************************************************************
End of Mathematica Notebook file.
*******************************************************************)