Skip to content

Commit ac50c6d

Browse files
update help v1.7.0
1 parent d4af849 commit ac50c6d

27 files changed

Lines changed: 483 additions & 27 deletions

en/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![banner](banner_homepage.png)
22

3-
### Nelson 1.6.0.0
3+
### Nelson 1.7.0.0
44

55
Nelson is an interactive, fully functional environment for engineering and scientific applications. It implements a matrix-driven language (which is largely compatible with MATLAB and GNU Octave), with advanced features such as 2-D 3-D plotting, image manipulation and viewing, a codeless interface to external C/C++/FORTRAN libraries, native support for various C types, and a host of other features.
66

en/SUMMARY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,13 +861,15 @@
861861
- [fill](./graphics/fill.md)
862862
- [gca](./graphics/gca.md)
863863
- [gcf](./graphics/gcf.md)
864+
- [Managing Callback Interruptions in Nelson](./graphics/graphical_callback.md)
864865
- [gray](./graphics/gray.md)
865866
- [grid](./graphics/grid.md)
866867
- [groot](./graphics/groot.md)
867868
- [hggroup](./graphics/hggroup.md)
868869
- [hist](./graphics/hist.md)
869870
- [hold](./graphics/hold.md)
870871
- [hot](./graphics/hot.md)
872+
- [im2double](./graphics/im2double.md)
871873
- [image](./graphics/image.md)
872874
- [imagesc](./graphics/imagesc.md)
873875
- [imread](./graphics/imread.md)
@@ -914,9 +916,12 @@
914916
- [text](./graphics/text.md)
915917
- [title](./graphics/title.md)
916918
- [turbo](./graphics/turbo.md)
919+
- [uicontrol](./graphics/uicontrol.md)
917920
- [validatecolor](./graphics/validatecolor.md)
918921
- [view](./graphics/view.md)
919922
- [viridis](./graphics/viridis.md)
923+
- [waitfor](./graphics/waitfor.md)
924+
- [waitforbuttonpress](./graphics/waitforbuttonpress.md)
920925
- [waterfall](./graphics/waterfall.md)
921926
- [white](./graphics/white.md)
922927
- [winter](./graphics/winter.md)

en/changelogs/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 1.7.0 (2024-08-27)
9+
10+
### Added
11+
12+
- `uicontrol` Create user interface control (button, slider, edit, list box, etc.).
13+
- `waitfor` Block execution and wait for condition.
14+
- `waitforbuttonpress` — Wait for click or key press.
15+
- `im2double` — Convert image to double.
16+
- `CloseRequestFcn` — Close request callback for `figure`.
17+
- `CreateFcn` — Create callback for all graphic objects.
18+
- `DeleteFcn` — Delete callback for all graphic objects.
19+
- `BusyAction` — Busy action for all graphic objects.
20+
- `Interruptible` — Interruptible property for all graphic objects.
21+
- `BeingDeleted` — Being deleted property for all graphic objects.
22+
- `KeyPressFcn`, `KeyReleaseFcn`, `ButtonDownFcn` properties for `figure`.
23+
24+
### Changed
25+
26+
- Refactor the internal implementation of the 'system' built-in function.
27+
28+
- Python 3.12.5 on Windows.
29+
830
## 1.6.0 (2024-06-29)
931

1032
### Added

en/graphics/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ graphics functions
3131
- [fill](fill.md) - Create filled 2-D patches.
3232
- [gca](gca.md) - get current axes graphics object.
3333
- [gcf](gcf.md) - get current figure graphics object.
34+
- [Managing Callback Interruptions in Nelson](graphical_callback.md)
3435
- [gray](gray.md) - Gray colormap array.
3536
- [grid](grid.md) - Display or hide axes grid lines.
3637
- [groot](groot.md) - graphic root object.
3738
- [hggroup](hggroup.md) - Create group object.
3839
- [hist](hist.md) - Histogram plot.
3940
- [hold](hold.md) - Retain current plot when adding new plots.
4041
- [hot](hot.md) - Hot colormap array.
42+
- [im2double](im2double.md) - Convert image to double precision.
4143
- [image](image.md) - Display image from array.
4244
- [imagesc](imagesc.md) - Display image from array with scaled colors.
4345
- [imread](imread.md) - Read image from graphics file.
@@ -84,9 +86,12 @@ graphics functions
8486
- [text](text.md) - creates text descriptions to data points.
8587
- [title](title.md) - Add title.
8688
- [turbo](turbo.md) - Turbo colormap array.
89+
- [uicontrol](uicontrol.md) - Create user interface component.
8790
- [validatecolor](validatecolor.md) - Validate color values.
8891
- [view](view.md) - Camera line of sigh.
8992
- [viridis](viridis.md) - Viridis colormap array.
93+
- [waitfor](waitfor.md) - Wait for condition.
94+
- [waitforbuttonpress](waitforbuttonpress.md) - Wait for click or key press.
9095
- [waterfall](waterfall.md) - waterfall plot.
9196
- [white](white.md) - white colormap array.
9297
- [winter](winter.md) - Winter colormap array.

en/graphics/SUMMARY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424
- [fill](fill.md)
2525
- [gca](gca.md)
2626
- [gcf](gcf.md)
27+
- [Managing Callback Interruptions in Nelson](graphical_callback.md)
2728
- [gray](gray.md)
2829
- [grid](grid.md)
2930
- [groot](groot.md)
3031
- [hggroup](hggroup.md)
3132
- [hist](hist.md)
3233
- [hold](hold.md)
3334
- [hot](hot.md)
35+
- [im2double](im2double.md)
3436
- [image](image.md)
3537
- [imagesc](imagesc.md)
3638
- [imread](imread.md)
@@ -77,9 +79,12 @@
7779
- [text](text.md)
7880
- [title](title.md)
7981
- [turbo](turbo.md)
82+
- [uicontrol](uicontrol.md)
8083
- [validatecolor](validatecolor.md)
8184
- [view](view.md)
8285
- [viridis](viridis.md)
86+
- [waitfor](waitfor.md)
87+
- [waitforbuttonpress](waitforbuttonpress.md)
8388
- [waterfall](waterfall.md)
8489
- [white](white.md)
8590
- [winter](winter.md)

en/graphics/axes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Create cartesian axes.
5959
<p><b>GridLineStyle</b> Line style for grid lines: '--' , ':', '-.', 'none' or '-' (default).</p>
6060
<p><b>HandleVisibility</b> Visibility of object handle: 'on' (default) or 'off'.</p>
6161
<p><b>HitTest</b> Response to captured mouse clicks: 'on' (default) or 'off'.</p>
62+
<p><b>BeingDeleted</b> Flag indicating that the object is being deleted.</p>
6263
<p><b>Interruptible</b> Callback interruption: </p>
6364
<p><b>Layer</b> Placement of grid lines and tick marks: 'top' or 'bottom' (default).</p>
6465
<p><b>LineStyleOrder</b> Line style order: character vector, cell array of character vectors, string array or '-' solid line (default).</p>
@@ -124,6 +125,9 @@ Create cartesian axes.
124125
<p><b>ZTickLabel</b> Tick labels: cell array of character vectors or '' (default).</p>
125126
<p><b>ZTickLabelMode</b> Selection mode for tick labels: 'manual' or 'auto' (default).</p>
126127
<p><b>ZTickMode</b>Selection mode for tick values: 'manual' or 'auto' (default).</p>
128+
<p><b>CreateFcn</b>Callback (function handle, string or cell) called when object is created.
129+
Set this property on an existing component has no effect.</p>
130+
<p><b>DeleteFcn</b>Callback (function handle, string or cell) called when object is deleted.</p>
127131
<p>Some properties are available only for compatibility and have currently no effect on the axes.</p>
128132

129133
## Example
@@ -152,6 +156,8 @@ plot(ax2, x, y2);
152156
| 1.0.0 | initial version |
153157
| 1.2.0 | Clicking on an axis automatically sets it as the current axes object. |
154158
| -- | GridAlpha, GridColor propertiew for Axes. |
159+
| 1.7.0 | CreateFcn, DeleteFcn callback added. |
160+
| -- | BeingDeleted property added. |
155161

156162
## Author
157163

en/graphics/contour.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ Contour plot of matrix
5656
<p><b>Type</b>: Type of graphics object 'contour'.</p>
5757
<p><b>Tag</b>: Object identifier: character vector, string scalar or '' (default).</p>
5858
<p><b>UserData</b>: User data: array or [] (default).</p>
59+
<p><b>CreateFcn</b>Callback (function handle, string or cell) called when object is created.
60+
Set this property on an existing component has no effect.</p>
61+
<p><b>DeleteFcn</b>Callback (function handle, string or cell) called when object is deleted.</p>
62+
<p><b>BeingDeleted</b> Flag indicating that the object is being deleted.</p>
5963

6064
## Examples
6165

@@ -119,9 +123,11 @@ contour(Z)
119123

120124
## History
121125

122-
| Version | Description |
123-
| ------- | --------------- |
124-
| 1.3.0 | initial version |
126+
| Version | Description |
127+
| ------- | ------------------------------------ |
128+
| 1.3.0 | initial version |
129+
| 1.7.0 | CreateFcn, DeleteFcn callback added. |
130+
| -- | BeingDeleted property added. |
125131

126132
## Author
127133

en/graphics/figure.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ Creates an figure window.
4949
<p><b>UserData</b>: User data: array or [] (default).</p>
5050
<p><b>Visible</b>: State of visibility: 'off' or 'on' (default).</p>
5151
<p><b>DrawLater</b>: is used to delay a huge succession of graphics commands (implying several drawings or redrawings): 'on' or 'off' (default).</p>
52+
<p><b>CloseRequestFcn</b>: Close request callback: function handle, cell array, character vector with 'closereq' (default).</p>
53+
<p><b>CreateFcn</b> Callback (function handle, string or cell) called when object is created.
54+
Set this property on an existing component has no effect.</p>
55+
<p><b>DeleteFcn</b> Callback (function handle, string or cell) called when object is deleted.</p>
56+
<p><b>KeyPressFcn</b> Callback (function handle, string or cell) called when a key is pressed while the figure has the focus.</p>
57+
<p><b>KeyReleaseFcn</b> Callback (function handle, string or cell) called when a key is released while the figure has the focus.</p>
58+
<p><b>ButtonDownFcn</b> Callback (function handle, string or cell) called when a mouse button is pressed while the figure has the focus.</p>
59+
<p><b>BeingDeleted</b> Flag indicating that the object is being deleted.</p>
5260

5361
## Example
5462

@@ -67,10 +75,12 @@ figure('Name', 'Hello')
6775

6876
## History
6977

70-
| Version | Description |
71-
| ------- | ------------------------------------------------------------------------- |
72-
| 1.0.0 | initial version |
73-
| 1.2.0 | Clicking on an figure automatically sets it as the current figure object. |
78+
| Version | Description |
79+
| ------- | ------------------------------------------------------------------------------------------------ |
80+
| 1.0.0 | initial version |
81+
| 1.2.0 | Clicking on an figure automatically sets it as the current figure object. |
82+
| 1.7.0 | CreateFcn, DeleteFcn, CloseRequestFcn, KeyPressFcn, KeyReleaseFcn, ButtonDownFcn callback added. |
83+
| -- | BeingDeleted property added. |
7484

7585
## Author
7686

en/graphics/graphical_callback.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Managing Callback Interruptions in Nelson
2+
3+
## Description
4+
5+
<p>You can assign a callback function to a callback property using one of the following methods:</p>
6+
<p><b>Function handle</b>: Use this approach when your callback does not need extra input arguments.</p>
7+
<p><b>Cell array</b>: Ideal for situations where your callback requires additional input arguments. The cell array should include the function handle as the first element, followed by the input arguments.</p>
8+
<p><b>Anonymous function</b>: This method is suitable for simple callback code or when you want to reuse a function that isn't exclusively used as a callback.</p>
9+
<p><b>Characters vector or scalar string</b> containing commands.</p>
10+
<p/>
11+
<p>Nelson provides control over whether a callback function can be interrupted during its execution. In some cases, allowing interruptions might be desirable, such as enabling users to stop an animation loop through an interrupting callback. However, in scenarios where the execution order of callbacks is crucial, it might be necessary to prevent interruptions to maintain the intended behavior, such as ensuring smooth responsiveness in applications that respond to pointer movements.</p>
12+
<p/>
13+
<p>Callback Interruption Behavior:</p>
14+
<p/>
15+
<p>Callbacks are executed in the order they are queued. When a callback is running and another user action triggers a second callback, this second callback attempts to interrupt the first one. The first callback is referred to as the "running callback," while the second is the "interrupting callback."</p>
16+
<p/>
17+
<p>In some cases, specific commands within the running callback prompt Nelson to process any pending callbacks in the queue.</p>
18+
<p>When Nelson encounters one of these commands such as <b>drawnow</b>, <b>figure</b>, <b>waitfor</b>, or <b>pause</b> it evaluates whether an interruption should occur.</p>
19+
<p/>
20+
<p>No Interruption: If the running callback does not include any of these commands, Nelson will complete the running callback before executing the interrupting callback.</p>
21+
<p/>
22+
<p>Interruption Conditions: If the running callback includes any of these commands, the behavior depends on the Interruptible property of the object that owns the running callback:</p>
23+
<p/>
24+
<p>If <b>Interruptible</b> is set to <b>'on'</b>, Nelson allows the interruption. The running callback is paused, the interrupting callback is executed, and once it is finished, Nelson resumes the execution of the running callback.</p>
25+
<p>If <b>Interruptible</b> is set to <b>'off'</b>, the interruption is blocked. The <b>BusyAction</b> property of the interrupting callback then dictates the next step:</p>
26+
<p>If <b>BusyAction</b> is <b>'queue'</b>, the interrupting callback will be executed after the running callback completes.</p>
27+
<p>If <b>BusyAction</b> is <b>'cancel'</b>, the interrupting callback is discarded and not executed.</p>
28+
<p>By default, the <b>Interruptible</b> property is <b>'on'</b>, and <b>BusyAction</b> is <b>'queue'</b>.</p>
29+
<p/>
30+
<p>Notably, certain callbacks specifically <b>DeleteFcn</b>, <b>CloseRequestFcn</b>, and <b>SizeChangedFcn</b> will interrupt the running callback regardless of the Interruptible property's value.</p>
31+
32+
## Example
33+
34+
uicontrol demo Interruptible
35+
36+
```matlab
37+
addpath([modulepath('graphics','root'), '/examples/uicontrol'])
38+
edit uicontrol_demo_interruptible
39+
uicontrol_demo_interruptible
40+
```
41+
42+
<img src="uicontrol_6_E87E65E2.png" align="middle"/>
43+
44+
## See also
45+
46+
[uicontrol](uicontrol.md), [drawnow](drawnow.md), [waitfor](waitfor.md).
47+
48+
## History
49+
50+
| Version | Description |
51+
| ------- | --------------- |
52+
| 1.0.0 | initial version |
53+
54+
## Author
55+
56+
Allan CORNET

en/graphics/im2double.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# im2double
2+
3+
Convert image to double precision.
4+
5+
## Syntax
6+
7+
- IM = im2double(I)
8+
- IM = im2double(I,'indexed')
9+
10+
## Input argument
11+
12+
- I - Input image: scalar, vector, matrix or multidimensional array with type single, double, int16, uint8, uint16 or logical.
13+
14+
## Output argument
15+
16+
- IM - The converted image is returned as a numeric array with the same dimensions as the input image I with type double.
17+
18+
## Description
19+
20+
<p><b>IM = im2double(I)</b> converts the input image I to double precision format. The input image IM can be a grayscale, truecolor, or binary image. When converting, <b>im2double</b> rescales the pixel values from their original integer format to a floating-point range of [0, 1].</p>
21+
<p>For an indexed image, <b>IM = im2double(I, 'indexed')</b> converts the image I to double precision as well, but with an added offset of 1 to the pixel values during the conversion from integer types.</p>
22+
23+
## Example
24+
25+
```matlab
26+
I = reshape(uint8(linspace(1,255,25)),[5 5]);
27+
IM1 = im2double(I)
28+
IM2 = im2double(I, 'indexed')
29+
```
30+
31+
## See also
32+
33+
[double](../double/double.md), [imread](imread.html).
34+
35+
## History
36+
37+
| Version | Description |
38+
| ------- | --------------- |
39+
| 1.0.0 | initial version |
40+
41+
## Author
42+
43+
Allan CORNET

0 commit comments

Comments
 (0)