# Resize!(matrix)

**URL:** https://discourse.julialang.org/t/resize-matrix/2379
**Category:** General Usage
**Tags:** question, matrix
**Created:** [March 1, 2017, 12:35pm UTC](https://discourse.julialang.org/t/resize-matrix/2379 "2017-03-01T12:35:20Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [March 2, 2017, 4:02pm UTC](https://discourse.julialang.org/t/resize-matrix/2379/2 "2017-03-02T16:02:22Z")

</div>

There is not. You have to create a new array and copy data to it, which is what any implementation of this functionality would have to do under the hood. There’s been a few discussions of supporting this, but the fact that it’s inherently so expensive has always steered the decision in favor of making the fact that it’s an expensive operation explicit. Another way to do this is to use a different data structure: a vector of vectors. For that data structure, adding or removing “columns” is cheap.

---

_[View the full topic](https://discourse.julialang.org/t/resize-matrix/2379)._
