Programmer Guide/SPU Reference/LENGTH: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
Number of elements in <var>A</var>
Number of elements in <var>A</var>
==<code>[SPU ABS <var>A</var> OUT <var>Y</var>]</code>==
==<code>[SPU LENGTH <var>A</var> OUT <var>Y NROW NCOL N</var>]</code>==
If <var>A</var> is a numerical data element (number, vector or matrix), the dimensions of <var>A</var> are stored in the outputs.
{|class="einrahmen"
{|class="einrahmen"
!In !!Out !!Description
!Out !!Description
|-
|-
|<var>A<sub>number</sub></var>
|<var>Y</sub></var> || number of rows; 1 if <var>A</var> is a number and &gt;1 otherwise
|<var>Y<sub>number</sub></var>
|<var>Y</var> = <nowiki>|</nowiki><var>A</var><nowiki>|</nowiki>
|-
|-
|<var>A<sub>vector</sub></var>
|<var>NROW</sub></var> || number of rows; 1 if <var>A</var> is a number and &gt;1 otherwise
|<var>Y<sub>vector</sub></var>
|-
|<var>Y</var>[i] = <nowiki>|</nowiki><var>A</var>[i]<nowiki>|</nowiki>
|<var>NCOL</sub></var> || number of columns; 1 if <var>A</var> is a number or vector and &gt;1 otherwise
|-
|<var>N</sub></var> || number of elements = number of rows * number of columns
|}
|}
with: 0 &le; i &lt; length of <var>A<sub>vector</sub></var>
with: 0 &le; i &lt; length of <var>A<sub>vector</sub></var>
;See also:
;See also:
<[[../#Signal Processing Atoms|SP-atoms]]>
<[[../#Signal Processing Atoms|SP-atoms]]>
<!-- AN, 2.5.2011 -->
<!-- AN, 2.5.2011 -->

Revision as of 13:40, 2 May 2011

Number of elements in A

[SPU LENGTH A OUT Y NROW NCOL N]

If A is a numerical data element (number, vector or matrix), the dimensions of A are stored in the outputs.

Out Description
Y number of rows; 1 if A is a number and >1 otherwise
NROW number of rows; 1 if A is a number and >1 otherwise
NCOL number of columns; 1 if A is a number or vector and >1 otherwise
N number of elements = number of rows * number of columns

with: 0 ≤ i < length of Avector

See also

<SP-atoms>

Navigation menu

Personal tools