A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://reference.wolfram.com/language/ref/ConstantArray.html below:

ConstantArray—Wolfram Language Documentation

WOLFRAM Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technology expertise.

WolframConsulting.com

BUILT-IN SYMBOL

ConstantArray[c,n]

generates a list of n copies of the element c.

ConstantArray[c,{n1,n2,}]

generates an array of nested lists containing copies of the element c.

Details Examplesopen allclose all Basic Examples  (3)

Make a vector of 10 c's:

Make a 3×4 array of c's:

Make an array out of blocks:

Scope  (4)

A machine-zero vector:

A vector of exact zeros:

A machine-zero matrix:

A matrix of exact zeros:

A vector of ones:

A machine-number vector of ones:

A deeply nested constant array:

Applications  (3)

Set up an array to use as storage in a program:

Numerically solve x'[t]==1/(t+x[t]^2) using Euler's method:

Find the sum of the elements in a list:

This can also be done with Total:

Use a vector of ones to see the effects of conditioning on the solution of a linear system:

The solution at machine precision has significant errors:

At higher precision, the solution is much better:

Properties & Relations  (3) Wolfram Research (2007), ConstantArray, Wolfram Language function, https://reference.wolfram.com/language/ref/ConstantArray.html (updated 2008). Text

Wolfram Research (2007), ConstantArray, Wolfram Language function, https://reference.wolfram.com/language/ref/ConstantArray.html (updated 2008).

CMS

Wolfram Language. 2007. "ConstantArray." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/ConstantArray.html.

APA

Wolfram Language. (2007). ConstantArray. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ConstantArray.html

BibTeX

@misc{reference.wolfram_2025_constantarray, author="Wolfram Research", title="{ConstantArray}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ConstantArray.html}", note=[Accessed: 11-July-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_constantarray, organization={Wolfram Research}, title={ConstantArray}, year={2008}, url={https://reference.wolfram.com/language/ref/ConstantArray.html}, note=[Accessed: 11-July-2025 ]}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4