> For the complete documentation index, see [llms.txt](https://nelson-9.gitbook.io/nelson/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nelson-9.gitbook.io/nelson/markdown/en/julia_engine/julia_types.md).

# Julia Nelson types

Managing Data between Julia and Nelson.

## 📄 Description

Managing data returned by Julia functions:

This documentation explains how data is managed and converted between Julia and Nelson. It covers scalar, vector, and matrix conversions, examples of usage, and related resources.

| Julia return type, as shown in Julia | Corresponding Nelson type (scalar) |
| ------------------------------------ | ---------------------------------- |
| Bool                                 | logical                            |
| Complex{Float64}                     | double (complex)                   |
| Complex{Float32}                     | single (complex)                   |
| Float64                              | double                             |
| Float32                              | single                             |
| Int8                                 | int8                               |
| Int16                                | int16                              |
| Int32                                | int32                              |
| Int64                                | int64                              |
| UInt8                                | uint8                              |
| UInt16                               | uint16                             |
| UInt32                               | uint32                             |
| UInt64                               | uint64                             |
| String                               | string                             |

Vector and Matrix of Nelson type returned as matrix in Julia.

cell converted to Array{Any}.

struct converted to Dict{Any, Any}.

matrix of struct converted to Matrix{Dict}.

dictionary converted to Dict{Any, Any}.

Ensure that all data passed between Julia and Nelson adheres to the type mappings described above for smooth conversions.

For advanced use cases, such as handling custom Julia types or deeply nested data structures, additional preprocessing in Julia or Nelson may be required.

## 💡 Examples

```matlab
R = jlrun('', "A", 'A', magic(3))
R.double()
```

```matlab
names = ["Unicycle" "Bicycle" "Tricycle"];
wheels = [1 2 3];
d = dictionary(wheels,names)
R = jlrun('', "A", 'A', d)

```

## 🔗 See also

[jlrun](/nelson/markdown/en/julia_engine/jlrun.md), [jlrunfile](/nelson/markdown/en/julia_engine/jlrunfile.md).

## 🕔 History

| Version | 📄 Description  |
| ------- | --------------- |
| 1.12.0  | initial version |
