


Laboratory Techniques  

An Introduction to MATHCAD 




Indices 

Range Variables 

The vectorise operator 

Summation 

Reading data files 




Index addressing allows access to individual
elements of array 

Examine & Set elements 

Indices start at 0 

Indices use [ key 

2D matrices use two indices for row, column
selection 




Simple 2 element vector 

Examine elements 



Set element 0 

Result of setting 




Sample matrix 

Examine elements 

Subscript too big 

Set element 

Result 





From matrix toolbar 

Forces evaluation on element by element basis 

Overrides normal matrix maths 

‘dot’ product 

Determinant M 

Powers M^{x} 




Dot product 







With vectorise operator 





Text Subscript 

. key 

Just a name 

1 placeholder 

Array Subscript 

[ key 

Index into array 

1 placeholder for name + 1 placeholder per index 




Take on a series of values 

Define using semicolon [;] 




Restrictions on where used 

‘illegal context’ error message 

Useful for filling arrays 






Define RV 

Use RV in array index & expression 




Use RV in expressions to create output array
from input array 






Can create RVs with different step sizes. 

Enter first 2 values separated by comma [,]
before typing [;] 






Summation operator on matrix palette 

Sum of all elements in a vector 





Operators on Calculus palette 

Do summation on any expression 

2 forms 

Plain => defines local RV 

Range Variable => uses existing RV 






Sum of first 5 integers 





Sum of elements 2030 of vector Counts 






Used Input table to put data into MathCAD by
hand. 

Can use Import on input table to get from a file
(makes a copy) 

Select table & rightclick 

Also can link to data file with File Read
Component (preferred) 





File Read Component 

Reads from datafile è array 

Text files 

Numbers separated by comma or tab 

Other formats supported 





InsertComponent…File Read or Write 

Wizard: 

(Select file type) 

Browse for file 

Finish 

Give name for array 





Arrays & Indices 

Columns (Revision) 

Submatrix() function 

Other array functions 

Reading data from file 

Analysis of data 


