We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
CenterArray[a,n]
creates a list of length n with the elements of a at the center and zeros elsewhere.
CenterArray[a,{n1,n2,…}]
creates an n1×n2×… array with the array a at the center and zeros elsewhere.
CenterArray[a,nspec,pad]
uses pad instead of zero for the background.
CenterArray[nspec]
creates an array with a single 1 at the center and zeros elsewhere.
DetailsCreate a list of length 5 with a single 1 at the center:
Create a list of length 5 with the specified element at the center:
Place an element at the center of a 2D array:
Scope (11) Data (9)Center a matrix to have 3 rows:
Center a matrix so its dimensions are {3,4}:
Create an array with more rows and fewer columns:
Padding (1)Use "Extrapolated" padding instead:
Applications (6)Conform a list of arrays so they have commensurate dimensions:
Conform elements of a list so they are all of length 3:
Apply a dimension-sensitive operator to the conformed elements:
Make a full array from a ragged list of full arrays:
Create a sharpening kernel from a lowpass kernel:
Sharpen an image by convolving with the computed kernel:
Show a collection of graphs with missing graphics:
By default, GraphicsGrid has empty spaces at the ends:
Properties & Relations (3)If the amount of padding is an odd number, additional padding is placed on the right:
The background value of sparse arrays is preserved, irrespective of the specified padding value:
The precision of the result is the minimum of the precisions of the input array and the padding value:
Possible Issues (2)Padding with nonconstant values may not be possible with empty list inputs:
This ragged input cannot be centered because it is not a list of full arrays with the same depths:
Use a specific target depth instead:
Center the resulting array in an array of rank 3:
Wolfram Research (2016), CenterArray, Wolfram Language function, https://reference.wolfram.com/language/ref/CenterArray.html. TextWolfram Research (2016), CenterArray, Wolfram Language function, https://reference.wolfram.com/language/ref/CenterArray.html.
CMSWolfram Language. 2016. "CenterArray." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CenterArray.html.
APAWolfram Language. (2016). CenterArray. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CenterArray.html
BibTeX@misc{reference.wolfram_2025_centerarray, author="Wolfram Research", title="{CenterArray}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/CenterArray.html}", note=[Accessed: 12-July-2025 ]}
BibLaTeX@online{reference.wolfram_2025_centerarray, organization={Wolfram Research}, title={CenterArray}, year={2016}, url={https://reference.wolfram.com/language/ref/CenterArray.html}, note=[Accessed: 12-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