# MAT.jl putting several tuples of variable string and variable in write()-command

**URL:** <https://discourse.julialang.org/t/mat-jl-putting-several-tuples-of-variable-string-and-variable-in-write-command/56542>\
**Category:** New to Julia\
**Created:** [March 5, 2021, 10:57am UTC](https://discourse.julialang.org/t/mat-jl-putting-several-tuples-of-variable-string-and-variable-in-write-command/56542 "2021-03-05T10:57:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Post date:** [March 5, 2021, 10:57am UTC](https://discourse.julialang.org/t/mat-jl-putting-several-tuples-of-variable-string-and-variable-in-write-command/56542/1 "2021-03-05T10:57:58Z")

</div>

Hi,  
given are two vectors: x, y  
Question: can I use one write()-command to save them to a mat- file, if I would like to use specific lables?

```julia
write(file_id, "vec_x", x)
write(file_id, "vec_sin", y)

```

is fine.

```julia
write(file_id, "vec_x", x, "vec_sin", y)

```

fails.  
Does a trick exist to do it properly?

remark: [I do not want to save “dict”-variables](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), it should be to vectors.

Stefan
