Hello, can you help me with my coding? My coding purpose is to redraw the correct line freehand drawing by B-spline following user intention. Could you help me with these coding? I use this coding since it doesnt run. And only one error include.

1 view (last 30 days)
editx = uispanedit(panel, ...
'Height', 25, ...
'HorizontalAlignment', 'left', ...
'TooltipString', 'x coordinate', ...
'Callback', @bspline_gui_setpoint);
Im_possible_woman on 8 Apr 2018
and this is my error message the error is in the line 45 which is:
Error in bspline_gui (line 45) editx = uispanedit(panel, ..
(those message error just within this code)

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 8 Apr 2018
In bspline_gui.m before the assignment to the variable fig, add the line
hg1 = verLessThan('matlab', '8.4');
Then change the assignment to ax to become
ax = axes('Parent', fig, ...
'Units', 'normalized', ...
'OuterPosition', [0.2 0 0.8 1], ...
'XLimMode', 'manual', ...
'YLimMode', 'manual', ...
'ZLimMode', 'manual');
if hg1
set(ax, 'DrawMode', 'fast');
set(ax, 'SortMethod', 'childorder');
Then in gui_bind_event.m change
validateattributes(obj, {'numeric'}, {'scalar'});
validateattributes(obj, {'numeric', 'matlab.ui.Figure'}, {'scalar'});
You will now be able to run the code.
The GUI should have four text edit boxes at the bottom left, but it probably will not have those until you resize the figure once. The boxes are probably going to show up as unlabeled. One is to edit x, another to edit y, another to edit z, and the last to edit w -- but the order will probably be w z y x from top to bottom. I do not know what these do.
If you resize the GUI too much, the text boxes will probably disappear. I do not know where they go.
If you right-click after placing points, you will not be able to add more points.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!