# openvar

Open variable in the Variable Editor

## 📝 Syntax

* openvar(varname)

## 📥 Input argument

* varname: a string or row vector characters - Name of the variable to open. Must exist in the current workspace.

## 📄 Description

openvar(varname) opens the variable named varname in Nelson's Variable Editor for graphical inspection and editing.

Any changes made to the variable within the editor are immediately applied to the workspace context.

The Variable Editor supports scalars, vectors, matrices, strings, cell arrays, tables and structures. Multidimensional arrays can be viewed but may have limited edit capabilities.

You can also open a variable by double-clicking it in the Variables panel.

The editor synchronizes automatically with the current workspace.

Editable Content: In structures (struct), cells (cell), and tables (table), only scalar elements can be edited.

Nelson provides full clipboard integration with spreadsheet applications like Microsoft Excel, LibreOffice Calc, and OpenOffice Calc.

You can copy variables from the Variable Editor and paste them directly into these applications, and vice versa.

![](https://160667757-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPvJ6mJve3gz5MU4d1%2Fuploads%2Fgit-blob-933c76c7f20b4a24acc29f1044034c7512f58d2e%2Fopenvar.png?alt=media)

## 💡 Example

```matlab
A = [1 2 3; 4 5 6]; openvar("A");
```

## 🔗 See also

[workspace](https://nelson-9.gitbook.io/Nelson/markdown/en/gui/workspace), [filebrowser](https://nelson-9.gitbook.io/Nelson/markdown/en/gui/filebrowser).

## 🕔 History

| Version | 📄 Description  |
| ------- | --------------- |
| 1.15.0  | initial version |
