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.
- 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.
Gijs van Oort (2020). UISignalBuilder2 (https://www.mathworks.com/matlabcentral/fileexchange/41615-uisignalbuilder2), MATLAB Central File Exchange. Retrieved .
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)
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)
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');
Made it work with R2015b and higher (where graphics handles are objects instead of numerical identifiers)
Added a 'Simulink|From Workspace'-friendly export function.