File Exchange

image thumbnail

Programmatically scroll Variables Editor

version 1.6 (480 KB) by

Opens a variable in the Variables Editor (grabs focus if open) and scrolls to position.

0 Downloads

Updated

----------------------------------------
EXISTING/NEW ISSUES (or enhancement requests):
- Please, check and report new issues to https://github.com/okomarov/scrollto/issues
- If a new issues occurs, provide all steps to reproduce it, even if it means including a "restart the pc" step.
----------------------------------------
Opens a variable in the Variables Editor (grabs focus if already open) and scrolls to given position/subs.
Supported scrollable classes (matrices):
* numeric
* logical
* cell
* timeseries
* table (from R2013b - v2.1)
* categorical (from 2013b - v2.1)
* dataset (Statistics Toolbox)

Examples:

% Scroll a simple logical variable
a = false(1e6,100);
pos = randi(1e8,1);
scrollto('a',pos)

% Scroll somewhere else
scrollto('a',[1e5, 28])

% Wrap into a structure and scroll the indexed variable
s.foo = a;
scrollto('s.foo',pos)

% Wrap into cell and scroll with several levels of nesting
c = {s};
scrollto('c{1}.foo', pos)

% Scroll 3D array
a = rand(10,10,10);
scrollto('a(:,:,2)',[5,2])

WARNING: this code heavily relies on undocumented and unsupported Matlab functionality.

p14v2.10

Comments and Ratings (4)

Oleg Komarov

Oleg Komarov (view profile)

@Klaus: the code is hosted on github and you can raise an issue there outlining the feature request and suggesting a solution, or you can submit a pull request directly with your changes!

Klaus Rezepka

I have found a basic implementation for scrolling struct arrays which works well for me. Pls. contact me if you need further details.

Klaus Rezepka

Very useful indeed.
Unfortunately struct arrays do not seem to be scrollable in M2013b.
What would be the way to implement this?

Eric

Eric (view profile)

Updates

1.6

Edited description

1.5

Linked to github

1.4

Added support for table and categorical arrays (classes introduced with R2013b)

1.3

Edited description.

1.2

Additional feature:
 - scrolls from 'caller' ws, e.g. scroll in debug mode;

Fixed bugs:
 - now handles corner case within size-bounds scrolling;
 - corrected the scrolling type of ts to dataset (was swapped before).

MATLAB Release
MATLAB 8.3 (R2014a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video