File Exchange

image thumbnail

UISignalBuilder2

version 1.2 (17 KB) by

A visual tool that allows to build signals and save them to workspace variables.

2 Downloads

Updated

View License

Modified version of UISignalBuilder by Laurent VAYLET.
Use this tool to create signals by mouse-clicks. They can then be exported to Matlab variables at a specified sample period.
Supports:
- Linear, spline, pchip and nearest neighbor interpolation,
- Multiple signals in one figure (you can add signals, not delete them),
- Save/reload data points to/from a workspace variable
- Export signals at a specified sample period.
- Choose which signals to export
- Export in a "Simulink|From Workspace"-friendly form (i.e. a struct with a 'time' and a 'signals' field).
- Intuitive pan/zoom

For this file, I modified the code by VAYLET. GridBagLayout was used for positioning the controls in the figure. A modified version of akZoom (named akZoom2, included in this package) was used for panning/zooming. Note that akZoom2 is not a mature product. It works for this specific project, but functionality in other cases is not guaranteed.

Comments and Ratings (3)

Stephan

Great, now it works! Thank you.

Stephan, the issue you describe is due to incompatibility with newer (>=2015b?) Matlab versions. There, a graphics handle is an object instead of a numerical identifier. And, isnan() can only handle numbers... I updated it so that it should work again (tested in R2016a)

Stephan

When I call "uisignalbuilder2" in R2015b I get the following error:

=================
Undefined function 'isnan' for input arguments of type 'matlab.graphics.axis.Axes'.

Error in layout.AbstractLayout/add (line 48)
            if ~isnan(h)

Error in layout.GridBagLayout/add (line 106)
            add@layout.AbstractLayout(this, h, row, col);

Error in uisignalbuilder2 (line 131)
figureLayout.add(hAxes, [1 2], 1, 'Fill', 'Both');
=================

Any ideas?

Updates

1.2

Made it work with R2015b and higher (where graphics handles are objects instead of numerical identifiers)

1.1

Added a 'Simulink|From Workspace'-friendly export function.

MATLAB Release
MATLAB 8.6 (R2015b)
Acknowledgements

Inspired by: GridBagLayout, UISIGNALBUILDER, akZoom

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

» Watch video