Programmer Guide/Command Reference/EVAL/nrow: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:nrow (alias: rows}}
{{DISPLAYTITLE:nrow (alias: rows)}}
 
Returns the number of rows of the argument <var>x</var>.
Returns the number of rows of the argument <var>x</var>.
;Usage: <code>ncol(<var>x</var>)</code>
;Result: The result of this function is the number of rows of <var>x</var>. If <var>x</var> is a scalar, the result is '''1'''.
;See also: [[../ncol|ncol]]


;Usage: '''<code>ncol(<var>x</var>)</code>'''
[[../#Functions|<function list>]]


;Result: The result of this function is the number of rows of <var>x</var>. If <var>x</var> is a scalar, the result is '''1'''.


;Example:
Example:
<pre>
<pre>
#vector := eval init(100,1,0)
#vector := eval init(100,1,0)
Line 14: Line 15:
conlog 'number of rows of $#vector: $#vector[!nrow]'
conlog 'number of rows of $#vector: $#vector[!nrow]'
</pre>
</pre>
;See also: [[Programmer_Guide/Command_Reference/EVAL/ncol|ncol]]
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]

Latest revision as of 11:27, 21 April 2011

Returns the number of rows of the argument x.

Usage
ncol(x)
Result
The result of this function is the number of rows of x. If x is a scalar, the result is 1.
See also
ncol

<function list>


Example:

#vector := eval init(100,1,0)
conlog 'number of rows of $#vector: $(eval ncol($#vector))'
// the attribute !nrow returns the same value:
conlog 'number of rows of $#vector: $#vector[!nrow]'

Navigation menu

Personal tools