From 7:00 PM CST Friday, January 24th - 7:00 PM CST Sunday, January 26th, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

ones (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: matrix

Requires: MathScript RT Module

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.

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 Yes

Examples

C = ones(3, 5)

Related Topics

eye
zeros

WAS THIS ARTICLE HELPFUL?

Not Helpful