# MATLAB Spoken Here

## Sorting in the Variable Editor

MATLAB R2012a saw a small update to the Variable Editor. This update allows you to sort a matrix by column. This supports a workflow where the variable editor appears like spreadsheet. You can also transpose the variable right inside the Variable Editor. Previously you would have to do this from the command line with the '-operator.

To transpose or sort variables, use the right-click menu options in the Variable Editor. You can sort variables based on single or multiple column selections. The columns you select can be non-contiguous and should always include all the rows. Also, you can create variables from non-contiguous data selections.

See the New Variable Editor Features in Release 2012a video for an in-depth overview.

### 2 Responses to “Sorting in the Variable Editor”

1. Jiro Doke replied on :

I’ve seen the Variable Editor grow from release to release, and I really like how it’s starting to shape up. There is another great improvement in this release which is the ability to view, edit, sort, reorder, and plot dataset arrays (from Statistics Toolbox) in the Variable Editor. Read about it here.

2. Andrew O'Connor replied on :

Hi Michael, one feature which I’d like to see is when you are in the editor, either writing script of debugging, and you right click on a variable name, it should have “Open in Variable Editor” option.

I use this technique to open functions all the time. When the workspace has lots of variables, it can get tedious to find them before double clicking to view it.

Any suggestions?

 Name (required) E-mail (required, will not be published) Website (optional) Spam protection (required): What is 5 + 8 ?

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>


If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).

News from the intersection of MATLAB, Community, and the web.

These postings are the author's and don't necessarily represent the opinions of MathWorks.