Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

ind_to_sub (MathScript RT Module Function)

LabVIEW 2011 MathScript RT Module Help

Edition Date: June 2011

Part Number: 373123B-01

»View Product Info

Owning Class: support

Requires: MathScript RT Module

Syntax

[c, d] = ind_to_sub(size, a)

Legacy Name: ind2sub

Description

Converts the linear indexes of matrix elements to their row-column positions.

Examples

Inputs

Name Description
size Specifies the size of a matrix. size is a two-element vector of integers.
a Specifies the linear positions of elements in a matrix of the size you specify. a is a matrix of integers.

Outputs

Name Description
c Returns the row numbers of the elements with linear positions a. c is a matrix of integers of the same size as a.
d Returns the column numbers of the elements with linear positions a. d is a matrix of integers of the same size as a.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

A = [1, 2, 3; 4, 5, 6]
SIZE = size(A)
[C, D] = ind_to_sub(SIZE, A)

Related Topics

flatindex


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit