# Is it possible for the MAT package to export multiple data sets using a single call of the \`write\` command?

**URL:** <https://discourse.julialang.org/t/is-it-possible-for-the-mat-package-to-export-multiple-data-sets-using-a-single-call-of-the-write-command/9716>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 14, 2018, 2:19pm UTC](https://discourse.julialang.org/t/is-it-possible-for-the-mat-package-to-export-multiple-data-sets-using-a-single-call-of-the-write-command/9716 "2018-03-14T14:19:56Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![tobydriscoll](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobydriscoll/32/1843_2.png) [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)\
**Post date:** [March 15, 2018, 11:55pm UTC](https://discourse.julialang.org/t/is-it-possible-for-the-mat-package-to-export-multiple-data-sets-using-a-single-call-of-the-write-command/9716/4 "2018-03-15T23:55:30Z")

</div>

The package docs suggest

```julia
matwrite("matfile.mat", Dict(
	"myvar1" => 0,
	"myvar2" => 1
))

```

There is a `@save` macro in the JLD.jl package to save “everything” in the workspace using native format. You’d have to do some adapting though, saving only objects of types that MAT.jl can handle.

---

_[View the full topic](https://discourse.julialang.org/t/is-it-possible-for-the-mat-package-to-export-multiple-data-sets-using-a-single-call-of-the-write-command/9716)._
