{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Matlab_Basics_FINAL(1)

# Matlab_Basics_FINAL(1) - Relational operators<<=...

This preview shows pages 1–3. Sign up to view the full content.

Matlab Basics Screen Layout Command Window (entering commands) Workspace (tracking variables) Command History (tracking commands) Basic Entering #’s NOTE: when you do not specify a name for a variable, Matlab assumes a name called ‘ans’ Entering #’s w/ ‘;’ Displaying values and text Preferences

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Preferences Command Window Short is the default format Commenting >>c=a*(b/12); %Units - inches Ranges >> T=0:0.1:1 >> T=0:1:10 Manually creating an array Note how ‘,’s and ‘;’ are used Specifically identifying array elements Note how the ‘origin’ starts at 1,1 versus 0,0 in Mathcad Clearing screen sections See the ‘Edit’ tab commands to clear any individual section Workspace Command history - Copy & paste - Repeat (double click) Arithmetic operators + - / *
^ NOTE: there is an ‘order’ to how programs evaluate… - Anything inside parentheses goes first - Exponentiation is second - Multiplication and division is third…from left to right - Addition and subtraction is fourth…again, from left to right
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Relational operators < <= ++ ~= >= > Logical operators And - & Or - | Not - ~ Functions` Sin(x) sin of ‘x’ in radians Tan(x) tangent of ‘x’ in radians Log10(x) common log of ‘x’ Log(x) natural log of ‘x’ Exp(x) e^x for ‘x’ Sqrt(x) square root of ‘x’ Abs(x) absolute value of ‘x’ Round(x) round off ‘x’ to nearest integer Arguments F(arg1,arg2) Known constants pi %pi = 3.1415… Plot Plot(x,y) Commands Clc – clears the command window Clear - removes all variables from memory Clear var1 var2 - just clears these specific variables Exist (‘name’) - determines if there is a variable with the name ‘name’ Quit – stops Matlab Who – lists all current variables Whos – lists all current variables and their size : - used to generate an array , - suppresses elements of an array ; - suppresses screen printing...
View Full Document

{[ snackBarMessage ]}

### Page1 / 3

Matlab_Basics_FINAL(1) - Relational operators<<=...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online