DOC PREVIEW
CSU MECH 102 - Range Variable Iteration and Multidimensional Arrays

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Range Variable Iteration and Multidimensional Arrays≔i‥05 ≔j‥03 ≔k‥06≔xii≔yj+j1 ≔zk−k1=x012345⎡⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎦=y1234⎡⎢⎢⎢⎣⎤⎥⎥⎥⎦=z−1012345⎡⎢⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎥⎦≔A,ij+xiyj=A123423453456456756786789⎡⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎦≔B,,ijk++xiyjzkdoesn't work =B?Range variable iteration works only with 1 or two subscripts, not 3 or moreCan create multidimensional array (vector of matrices) instead:≔M,530allocate matrix of zeroes (size: max i by max j)≔BkM=B[6 × 4][6 × 4][6 × 4][6 × 4][6 × 4][6 × 4][6 × 4]⎡⎢⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎥⎦=B0000000000000000000000000⎡⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎦=B1000000000000000000000000⎡⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎦≔⎛⎝Bk⎞⎠,ij++xiyjzkthis doesn't work either =B?Non-Commercial Use OnlyNeed to create it in a program instead:≔B‖‖‖‖‖‖‖‖‖‖‖‖‖‖‖‖‖‖||||||||||||||||←M,530for ∊|||||||||||||k‥06‖‖‖‖‖‖‖‖‖‖‖‖for ∊|||||||||i‥05‖‖‖‖‖‖‖‖‖for ∊|||||||j‥03‖‖‖‖‖‖‖←xi←y+j1←z−k1←M,ij++xyz←BkMB=B[6 × 4][6 × 4][6 × 4][6 × 4][6 × 4][6 × 4][6 × 4]⎡⎢⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎥⎦=B0012312342345345645675678⎡⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎦=B1123423453456456756786789⎡⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎦=B6678978910891011910111210 11 12 1311 12 13 14⎡⎢⎢⎢⎢⎢⎢⎣⎤⎥⎥⎥⎥⎥⎥⎦Non-Commercial Use


View Full Document

CSU MECH 102 - Range Variable Iteration and Multidimensional Arrays

Download Range Variable Iteration and Multidimensional Arrays
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Range Variable Iteration and Multidimensional Arrays and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Range Variable Iteration and Multidimensional Arrays 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?