Category Archive for: Vectors and Matrices

Nested arrays

An array element need not be a scalar. In Mathcad Professional it’s possible to make an array element itself be another array. This allows you to create arrays within arrays. These arrays behave very much like arrays whose elements are all scalars. However, there are some distinctions: • You cannot use the Matrix command from the Insert…

Read More →

Arrays and user-defined functions

The arguments in a function definition need not be scalar variables. They can also be vectors or matrices. Functions can return values that are scalars, vectors, or matrices. Figure 10-21 shows some examples of functions with vector and matrix arguments and results Note that if a function expects a vector or a matrix for an argument, it…

Read More →

Simultaneous definitions

You can use vectors and matrices to define several variables at once. You do this by placing an array of variable names on the left side of a and a corresponding array of values to the right. Mathcad assigns the values on the right to the corresponding names on the left. Figure 10-20 shows two such definitions The…

Read More →

Doing calculations in parallel

Any calculation Mathcad can perform with single values, it can also perform with vectors or matrices of values. There are two ways to do this: • By iterating over each element using range variables as described in Chapter 11, “Range Variables.” • By using the “vectorize” operator described in this chapter. Mathcad’s vectorize operator allows it to…

Read More →

Vector and matrix functions

Mathcad includes functions for manipulating arrays in ways that are common in linear algebra. These functions are intended for use with vectors and matrices. If a function is not explicitly set up to take a vector or matrix argument, it is inappropriate to supply one to it as an argument. Note that functions which expect vectors always expect…

Read More →

Vector and matrix operators

Some of Mathcad’s operators have special meanings for vectors and matrices. For example, the multiplication symbol means multiplication when applied to two numbers, but it means dot product when applied to vectors, and matrix multiplication, when applied to matrices. The table below describes Mathcad’s vector and matrix operations. Many of these operators are available from the Vector and Matrices…

Read More →

Limits on array sizes

Mathcad has the following limits on the sizes of arrays to be defined, entered, or displayed: Limit on input arrays you cannot use the Matrix command on the Insert menu to create an array having more than 100 elements. This limitation applies whether you attempt to create a new array or add to an existing array. You can…

Read More →

Displaying vectors and matrices

After computing with arrays in Mathcad, your resulting arrays may be large and unwieldy when displayed. Mathcad therefore displays matrices and vectors having more than nine rows or columns as scrolling output tables rather than as matrices or vectors. Figure 10-7 shows an example A scrolling output table displays a portion of an array. To the left of…

Read More →

Subscripts and superscripts

You can refer to individual array elements by using subscripts. You can also refer to an entire column of an array by using a superscript. To type a subscript, use the left bracket key” [ ” and put an integer or a pair of integers in the placeholder. To insert a superscript operator, press [Ctrl]6 and place an…

Read More →

Computing with arrays

Variables can represent arrays as well as scalars. Defining a variable as an array is very much like defining a scalar. First type a variable name and a colon as you would with any other definition. Then create an array (vector or matrix) on the other s~depf the equation. For example, to define a vector v, follow these…

Read More →

Back to Top