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

ones (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

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.

Examples

C = ones(3, 5)

Related Topics

eye
zeros


 

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