Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

ones (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the matrix class.

Syntax

c = ones(a)

c = ones(a, b)

c = ones([a, b])

Description

Generates a matrix of ones.

Examples

Inputs

Name Description
a Specifies the number of rows in c. a is a positive integer.
b Specifies the number of columns in c. b is a positive integer.

Outputs

Name Description
c Returns an a-by-b matrix whose elements are all 1s. If you do not specify b, c returns a square matrix of order a.

Examples

C = ones(3, 5)

Related Topics

eye
zeros


Resources


 

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