runmat 0.5.2-dev.4 → 0.5.2-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/stdlib.snapshot +0 -0
- package/dist/generated/builtin-examples-catalog.d.ts.map +1 -1
- package/dist/generated/builtin-examples-catalog.js +1 -1
- package/dist/generated/builtin-examples-catalog.js.map +1 -1
- package/dist/generated/builtins/butter.d.ts +4 -0
- package/dist/generated/builtins/butter.d.ts.map +1 -0
- package/dist/generated/builtins/butter.js +112 -0
- package/dist/generated/builtins/butter.js.map +1 -0
- package/dist/generated/builtins/dcgain.d.ts +4 -0
- package/dist/generated/builtins/dcgain.d.ts.map +1 -0
- package/dist/generated/builtins/dcgain.js +96 -0
- package/dist/generated/builtins/dcgain.js.map +1 -0
- package/dist/generated/builtins/feedback.d.ts +4 -0
- package/dist/generated/builtins/feedback.d.ts.map +1 -0
- package/dist/generated/builtins/feedback.js +114 -0
- package/dist/generated/builtins/feedback.js.map +1 -0
- package/dist/generated/builtins/imhist.d.ts +4 -0
- package/dist/generated/builtins/imhist.d.ts.map +1 -0
- package/dist/generated/builtins/imhist.js +123 -0
- package/dist/generated/builtins/imhist.js.map +1 -0
- package/dist/generated/builtins/isstable.d.ts +4 -0
- package/dist/generated/builtins/isstable.d.ts.map +1 -0
- package/dist/generated/builtins/isstable.js +96 -0
- package/dist/generated/builtins/isstable.js.map +1 -0
- package/dist/generated/builtins/pole.d.ts +4 -0
- package/dist/generated/builtins/pole.d.ts.map +1 -0
- package/dist/generated/builtins/pole.js +96 -0
- package/dist/generated/builtins/pole.js.map +1 -0
- package/dist/generated/builtins/rref.d.ts.map +1 -1
- package/dist/generated/builtins/rref.js +36 -57
- package/dist/generated/builtins/rref.js.map +1 -1
- package/dist/generated/builtins/run.d.ts +4 -0
- package/dist/generated/builtins/run.d.ts.map +1 -0
- package/dist/generated/builtins/run.js +118 -0
- package/dist/generated/builtins/run.js.map +1 -0
- package/dist/generated/builtins/step.d.ts.map +1 -1
- package/dist/generated/builtins/step.js +14 -3
- package/dist/generated/builtins/step.js.map +1 -1
- package/dist/generated/builtins/stepinfo.d.ts +4 -0
- package/dist/generated/builtins/stepinfo.d.ts.map +1 -0
- package/dist/generated/builtins/stepinfo.js +111 -0
- package/dist/generated/builtins/stepinfo.js.map +1 -0
- package/dist/generated/builtins/tf.d.ts.map +1 -1
- package/dist/generated/builtins/tf.js +41 -9
- package/dist/generated/builtins/tf.js.map +1 -1
- package/dist/generated/builtins-manifest.d.ts.map +1 -1
- package/dist/generated/builtins-manifest.js +177 -9
- package/dist/generated/builtins-manifest.js.map +1 -1
- package/dist/lsp/runmat_lsp.d.ts +3 -3
- package/dist/lsp/runmat_lsp.js +7 -7
- package/dist/lsp/runmat_lsp_bg.wasm +0 -0
- package/dist/lsp/runmat_lsp_bg.wasm.d.ts +3 -3
- package/dist/pkg-web/runmat_wasm_web.d.ts +4 -4
- package/dist/pkg-web/runmat_wasm_web.js +10 -10
- package/dist/pkg-web/runmat_wasm_web_bg.wasm +0 -0
- package/dist/pkg-web/runmat_wasm_web_bg.wasm.d.ts +4 -4
- package/dist/runtime/stdlib.snapshot +0 -0
- package/package.json +2 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "pole",
|
|
5
|
+
"category": "control",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pole",
|
|
8
|
+
"poles",
|
|
9
|
+
"stability",
|
|
10
|
+
"control system",
|
|
11
|
+
"tf"
|
|
12
|
+
],
|
|
13
|
+
"summary": "Return poles of SISO transfer-function models.",
|
|
14
|
+
"references": [
|
|
15
|
+
"title: \"MATLAB pole documentation\""
|
|
16
|
+
],
|
|
17
|
+
"gpu_support": {
|
|
18
|
+
"elementwise": false,
|
|
19
|
+
"reduction": false,
|
|
20
|
+
"precisions": [],
|
|
21
|
+
"broadcasting": "none",
|
|
22
|
+
"notes": "`pole` computes roots from host-side denominator metadata."
|
|
23
|
+
},
|
|
24
|
+
"fusion": {
|
|
25
|
+
"elementwise": false,
|
|
26
|
+
"reduction": false,
|
|
27
|
+
"max_inputs": 0,
|
|
28
|
+
"constants": "inline",
|
|
29
|
+
"notes": "`pole` is model analysis and is not fused."
|
|
30
|
+
},
|
|
31
|
+
"requires_feature": null,
|
|
32
|
+
"tested": {
|
|
33
|
+
"unit": "builtins::control::pole::tests",
|
|
34
|
+
"integration": "crates/runmat-vm/tests/control.rs"
|
|
35
|
+
},
|
|
36
|
+
"description": "`pole(sys)` returns the roots of the denominator polynomial for a supported SISO `tf` model.",
|
|
37
|
+
"behaviors": [
|
|
38
|
+
"Supports SISO `tf` objects.",
|
|
39
|
+
"Returns an `N x 1` real vector when all poles are real.",
|
|
40
|
+
"Returns an `N x 1` complex vector when any pole has a nonzero imaginary part.",
|
|
41
|
+
"Static-gain models return an empty pole vector."
|
|
42
|
+
],
|
|
43
|
+
"examples": [
|
|
44
|
+
{
|
|
45
|
+
"description": "Second-order poles",
|
|
46
|
+
"input": "H = tf(1, [1 3 2]);\npole(H)",
|
|
47
|
+
"output": "ans = [-1; -2]"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"faqs": [
|
|
51
|
+
{
|
|
52
|
+
"question": "Does `pole` cancel pole-zero pairs?",
|
|
53
|
+
"answer": "No. It returns roots of the stored denominator polynomial for the supplied model."
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"links": [
|
|
57
|
+
{
|
|
58
|
+
"label": "roots",
|
|
59
|
+
"url": "./roots"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"label": "isstable",
|
|
63
|
+
"url": "./isstable"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"source": {
|
|
67
|
+
"label": "`crates/runmat-runtime/src/builtins/control/pole.rs`",
|
|
68
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/pole.rs"
|
|
69
|
+
},
|
|
70
|
+
"syntax": {
|
|
71
|
+
"example": {
|
|
72
|
+
"description": "Supported form",
|
|
73
|
+
"input": "p = pole(sys)",
|
|
74
|
+
"output": "p is a column vector."
|
|
75
|
+
},
|
|
76
|
+
"points": [
|
|
77
|
+
"`sys` must be a SISO `tf` object."
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"validation": {
|
|
81
|
+
"summary": "`pole` validates the input model and computes denominator roots through the shared control polynomial root path. Tests cover real poles and VM integration.",
|
|
82
|
+
"implementation": {
|
|
83
|
+
"label": "`crates/runmat-runtime/src/builtins/control/pole.rs`",
|
|
84
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/pole.rs"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"gpu_residency": "`pole` returns host-resident vectors.",
|
|
88
|
+
"key": "pole",
|
|
89
|
+
"slug": "pole",
|
|
90
|
+
"aliases": [],
|
|
91
|
+
"categoryPath": [
|
|
92
|
+
"control"
|
|
93
|
+
]
|
|
94
|
+
};
|
|
95
|
+
export default builtinDoc;
|
|
96
|
+
//# sourceMappingURL=pole.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pole.js","sourceRoot":"","sources":["../../../src/generated/builtins/pole.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE;QACV,MAAM;QACN,OAAO;QACP,WAAW;QACX,gBAAgB;QAChB,IAAI;KACL;IACD,SAAS,EAAE,gDAAgD;IAC3D,YAAY,EAAE;QACZ,sCAAsC;KACvC;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO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Ae,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rref.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/rref.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"rref.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/rref.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA2GjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -6,12 +6,11 @@ const builtinDoc = {
|
|
|
6
6
|
"keywords": [
|
|
7
7
|
"rref",
|
|
8
8
|
"reduced row echelon form",
|
|
9
|
+
"row reduction",
|
|
9
10
|
"pivot columns",
|
|
10
|
-
"
|
|
11
|
-
"tolerance",
|
|
12
|
-
"gpu"
|
|
11
|
+
"rank"
|
|
13
12
|
],
|
|
14
|
-
"summary": "Compute reduced row echelon form and
|
|
13
|
+
"summary": "Compute reduced row echelon form and pivot columns.",
|
|
15
14
|
"references": [],
|
|
16
15
|
"gpu_support": {
|
|
17
16
|
"elementwise": false,
|
|
@@ -21,73 +20,57 @@ const builtinDoc = {
|
|
|
21
20
|
"f64"
|
|
22
21
|
],
|
|
23
22
|
"broadcasting": "none",
|
|
24
|
-
"notes": "
|
|
23
|
+
"notes": "GPU inputs are gathered to the shared host row-reduction implementation. Real reduced matrices are re-uploaded when a provider is available; upload failures surface as `RunMat:rref:Internal`."
|
|
25
24
|
},
|
|
26
25
|
"fusion": {
|
|
27
26
|
"elementwise": false,
|
|
28
27
|
"reduction": false,
|
|
29
|
-
"max_inputs":
|
|
28
|
+
"max_inputs": 2,
|
|
30
29
|
"constants": "inline"
|
|
31
30
|
},
|
|
32
31
|
"requires_feature": null,
|
|
33
32
|
"tested": {
|
|
34
33
|
"unit": "builtins::math::linalg::solve::rref::tests",
|
|
35
|
-
"
|
|
36
|
-
"wgpu": "builtins::math::linalg::solve::rref::tests::rref_wgpu_matches_cpu"
|
|
34
|
+
"integration": "bytecode::compile::tests::compile_interprets_rref_rank_workflow"
|
|
37
35
|
},
|
|
38
|
-
"description": "`rref(A)` returns the reduced row echelon form of matrix `
|
|
36
|
+
"description": "`rref(A)` returns the reduced row echelon form of a real or complex numeric matrix. `[R, pivots] = rref(A)` also returns the one-based pivot column indices. An optional tolerance controls which entries are considered zero during pivot selection.",
|
|
39
37
|
"behaviors": [
|
|
40
|
-
"
|
|
41
|
-
"The
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
38
|
+
"Inputs must behave like 2-D matrices. Trailing singleton dimensions are accepted; other higher-rank inputs raise `RunMat:rref:InvalidInput`.",
|
|
39
|
+
"The default tolerance is `max(size(A)) * eps(norm(A, inf))`, matching MATLAB row-reduction conventions.",
|
|
40
|
+
"`rref(A, tol)` uses a caller-provided finite, non-negative scalar pivot tolerance.",
|
|
41
|
+
"Logical and integer inputs are promoted to double precision before row reduction.",
|
|
42
|
+
"Complex inputs use complex Gauss-Jordan elimination with pivot selection by complex magnitude.",
|
|
43
|
+
"The second output is a row vector of one-based pivot column indices.",
|
|
44
|
+
"Non-finite values are accepted. The default tolerance still follows `max(size(A)) * eps(norm(A, inf))`; `Inf` and `NaN` therefore follow the runtime's IEEE floating-point tolerance and pivot arithmetic."
|
|
47
45
|
],
|
|
48
46
|
"examples": [
|
|
49
47
|
{
|
|
50
|
-
"description": "
|
|
51
|
-
"input": "A = [1 2
|
|
52
|
-
"output": "R
|
|
48
|
+
"description": "Finding dependent columns",
|
|
49
|
+
"input": "A = [1 2 3; 2 4 6; 1 1 1];\n[R, pivots] = rref(A)",
|
|
50
|
+
"output": "R = [1 0 -1; 0 1 2; 0 0 0]\npivots = [1 2]"
|
|
53
51
|
},
|
|
54
52
|
{
|
|
55
|
-
"description": "
|
|
56
|
-
"input": "A = [1
|
|
57
|
-
"output": "R
|
|
53
|
+
"description": "Using a custom tolerance",
|
|
54
|
+
"input": "A = diag([1, 1e-12]);\nR = rref(A, 1e-6)",
|
|
55
|
+
"output": "R = [1 0; 0 0]"
|
|
58
56
|
},
|
|
59
57
|
{
|
|
60
|
-
"description": "
|
|
61
|
-
"input": "A =
|
|
62
|
-
"output": "R =\n 1 0\n 0 0\npivcol =\n 1"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"description": "Reducing a row vector",
|
|
66
|
-
"input": "v = [2 4 6];\nR = rref(v)",
|
|
67
|
-
"output": "R =\n 1 2 3"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"description": "Using rref with gpuArray data",
|
|
71
|
-
"input": "G = gpuArray([1 2; 3 4]);\n[R, pivcol] = rref(G);\nR_host = gather(R)\npiv_host = gather(pivcol)",
|
|
72
|
-
"output": "R_host =\n 1 0\n 0 1\npiv_host =\n 1 2"
|
|
58
|
+
"description": "Row-reducing an augmented system",
|
|
59
|
+
"input": "A = [2 -1 3; 4 -2 6; 1 0 1];\nb = [5; 10; 2];\nRAug = rref([A b])"
|
|
73
60
|
}
|
|
74
61
|
],
|
|
75
62
|
"faqs": [
|
|
76
63
|
{
|
|
77
|
-
"question": "How
|
|
78
|
-
"answer": "RunMat
|
|
64
|
+
"question": "How does `rref` choose pivots?",
|
|
65
|
+
"answer": "RunMat scans columns left to right, picks the largest available pivot by magnitude below the current pivot row, normalizes the pivot row, and eliminates the pivot column above and below the pivot."
|
|
79
66
|
},
|
|
80
67
|
{
|
|
81
|
-
"question": "
|
|
82
|
-
"answer": "
|
|
68
|
+
"question": "Is the pivot vector one-based?",
|
|
69
|
+
"answer": "Yes. The second output uses MATLAB's one-based column indices."
|
|
83
70
|
},
|
|
84
71
|
{
|
|
85
|
-
"question": "Does `rref`
|
|
86
|
-
"answer": "
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"question": "Will calling `rref` move GPU data back to the CPU?",
|
|
90
|
-
"answer": "Only when the active provider lacks a native implementation. The current WGPU backend gathers, computes on the host, and re-uploads both outputs so later GPU work can continue with resident tensors."
|
|
72
|
+
"question": "Does `rref` use the same tolerance as `rank`?",
|
|
73
|
+
"answer": "No. `rank` uses an SVD tolerance. `rref` uses the MATLAB row-reduction tolerance based on the matrix infinity norm."
|
|
91
74
|
}
|
|
92
75
|
],
|
|
93
76
|
"links": [
|
|
@@ -100,25 +83,21 @@ const builtinDoc = {
|
|
|
100
83
|
"url": "./pinv"
|
|
101
84
|
},
|
|
102
85
|
{
|
|
103
|
-
"label": "
|
|
104
|
-
"url": "./
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"label": "qr",
|
|
108
|
-
"url": "./qr"
|
|
86
|
+
"label": "linsolve",
|
|
87
|
+
"url": "./linsolve"
|
|
109
88
|
},
|
|
110
89
|
{
|
|
111
|
-
"label": "
|
|
112
|
-
"url": "./
|
|
90
|
+
"label": "mldivide",
|
|
91
|
+
"url": "./mldivide"
|
|
113
92
|
}
|
|
114
93
|
],
|
|
115
94
|
"source": {
|
|
116
|
-
"label": "crates/runmat-runtime/src/builtins/math/linalg/solve/rref.rs",
|
|
117
|
-
"url": "crates/runmat-runtime/src/builtins/math/linalg/solve/rref.rs"
|
|
95
|
+
"label": "`crates/runmat-runtime/src/builtins/math/linalg/solve/rref.rs`",
|
|
96
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/math/linalg/solve/rref.rs"
|
|
118
97
|
},
|
|
119
|
-
"gpu_residency": "
|
|
98
|
+
"gpu_residency": "When the input is a real gpuArray, RunMat gathers it, computes the row-reduced matrix on the host, and re-uploads the reduced matrix if a provider is available. If that re-upload fails, the builtin raises `RunMat:rref:Internal` rather than silently changing residency. Pivot-column metadata is returned as a host vector.",
|
|
120
99
|
"gpu_behavior": [
|
|
121
|
-
"
|
|
100
|
+
"`rref` is an eager solve-style operation. It terminates fusion plans, gathers GPU-resident inputs for numerical row reduction, and returns ordinary MATLAB-compatible values."
|
|
122
101
|
],
|
|
123
102
|
"key": "rref",
|
|
124
103
|
"slug": "rref",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rref.js","sourceRoot":"","sources":["../../../src/generated/builtins/rref.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,mBAAmB;IAC/B,UAAU,EAAE;QACV,MAAM;QACN,0BAA0B;QAC1B,eAAe;QACf,
|
|
1
|
+
{"version":3,"file":"rref.js","sourceRoot":"","sources":["../../../src/generated/builtins/rref.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,mBAAmB;IAC/B,UAAU,EAAE;QACV,MAAM;QACN,0BAA0B;QAC1B,eAAe;QACf,eAAe;QACf,MAAM;KACP;IACD,SAAS,EAAE,qDAAqD;IAChE,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE;YACZ,KAAK;YACL,KAAK;SACN;QACD,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,iMAAiM;KAC3M;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;KACtB;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,4CAA4C;QACpD,aAAa,EAAE,iEAAiE;KACjF;IACD,aAAa,EAAE,uPAAuP;IACtQ,WAAW,EAAE;QACX,8IAA8I;QAC9I,yGAAyG;QACzG,oFAAoF;QACpF,mFAAmF;QACnF,gGAAgG;QAChG,sEAAsE;QACtE,4MAA4M;KAC7M;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,2BAA2B;YAC1C,OAAO,EAAE,mDAAmD;YAC5D,QAAQ,EAAE,4CAA4C;SACvD;QACD;YACE,aAAa,EAAE,0BAA0B;YACzC,OAAO,EAAE,0CAA0C;YACnD,QAAQ,EAAE,gBAAgB;SAC3B;QACD;YACE,aAAa,EAAE,kCAAkC;YACjD,OAAO,EAAE,mEAAmE;SAC7E;KACF;IACD,MAAM,EAAE;QACN;YACE,UAAU,EAAE,gCAAgC;YAC5C,QAAQ,EAAE,sMAAsM;SACjN;QACD;YACE,UAAU,EAAE,gCAAgC;YAC5C,QAAQ,EAAE,gEAAgE;SAC3E;QACD;YACE,UAAU,EAAE,+CAA+C;YAC3D,QAAQ,EAAE,qHAAqH;SAChI;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,YAAY;SACpB;QACD;YACE,OAAO,EAAE,UAAU;YACnB,KAAK,EAAE,YAAY;SACpB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,gEAAgE;QACzE,KAAK,EAAE,6GAA6G;KACrH;IACD,eAAe,EAAE,kUAAkU;IACnV,cAAc,EAAE;QACd,+KAA+K;KAChL;IACD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,MAAM;QACN,QAAQ;QACR,OAAO;KACR;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAiHjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "run",
|
|
5
|
+
"category": "io/repl_fs",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"run",
|
|
8
|
+
"script",
|
|
9
|
+
"matlab script",
|
|
10
|
+
"workspace",
|
|
11
|
+
"path"
|
|
12
|
+
],
|
|
13
|
+
"summary": "Execute a MATLAB script file in the caller workspace.",
|
|
14
|
+
"references": [],
|
|
15
|
+
"gpu_support": {
|
|
16
|
+
"elementwise": false,
|
|
17
|
+
"reduction": false,
|
|
18
|
+
"precisions": [],
|
|
19
|
+
"broadcasting": "none",
|
|
20
|
+
"notes": "Script resolution and execution run on the host. gpuArray text inputs are gathered before lookup."
|
|
21
|
+
},
|
|
22
|
+
"fusion": {
|
|
23
|
+
"elementwise": false,
|
|
24
|
+
"reduction": false,
|
|
25
|
+
"max_inputs": 1,
|
|
26
|
+
"constants": "inline"
|
|
27
|
+
},
|
|
28
|
+
"requires_feature": null,
|
|
29
|
+
"tested": {
|
|
30
|
+
"unit": "builtins::io::repl_fs::run::tests",
|
|
31
|
+
"integration": [
|
|
32
|
+
"run_executes_script_file_in_current_workspace",
|
|
33
|
+
"run_exposes_script_variables_to_following_call_syntax",
|
|
34
|
+
"run_script_variables_shadow_builtin_constants",
|
|
35
|
+
"run_replays_script_stdout_to_request_streams",
|
|
36
|
+
"run_command_syntax_resolves_scripts_on_search_path",
|
|
37
|
+
"run_preserves_script_source_context",
|
|
38
|
+
"run_missing_file_and_output_errors_are_catchable"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"description": "`run` locates a `.m` script by file name, relative path, absolute path, or active MATLAB search path entry, then executes that script in the caller workspace. Variables assigned by the script are visible to following statements in the caller.",
|
|
42
|
+
"behaviors": [
|
|
43
|
+
"`run('script')` resolves `script.m` when no extension is supplied. Bare `.m` filenames also search the active MATLAB path. `run('folder/script.m')` executes the file at that path.",
|
|
44
|
+
"Command syntax is supported: `run script_name` is equivalent to `run('script_name')`.",
|
|
45
|
+
"The target file is executed as a script, not as a function. Assignments mutate the caller workspace and local functions in the script remain available to that script.",
|
|
46
|
+
"`mfilename` inside the executed script reports the executed file name and full path, matching the script source context.",
|
|
47
|
+
"`run` has no outputs. Requesting an output raises `RunMat:run:TooManyOutputs` before executing the file.",
|
|
48
|
+
"If the script throws an error, the error is catchable by the caller and assignments performed before that error remain in the caller workspace.",
|
|
49
|
+
"Names that may be introduced by a script are tracked as dynamic workspace bindings. Bare reads of names the script did not assign raise `RunMat:UndefinedVariable` at runtime unless the name is a builtin constant; call syntax such as `name(...)` checks the caller workspace first, then falls back to normal function or builtin resolution."
|
|
50
|
+
],
|
|
51
|
+
"examples": [
|
|
52
|
+
{
|
|
53
|
+
"description": "Execute a script in the current folder",
|
|
54
|
+
"input": "run('setup_experiment');\nresult = configured_gain * 2;"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"description": "Execute a script found on the search path",
|
|
58
|
+
"input": "addpath('examples');\nrun fm_demo\nplot(t, demodulated)"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"description": "Catch script execution errors",
|
|
62
|
+
"input": "try\n run('maybe_missing_script');\ncatch e\n disp(e.identifier)\nend"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"faqs": [
|
|
66
|
+
{
|
|
67
|
+
"question": "Does `run` call functions?",
|
|
68
|
+
"answer": "No. `run` executes script files. Function files should be called by their function name."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"question": "Can `run` return a value?",
|
|
72
|
+
"answer": "No. MATLAB's `run` executes for side effects in the caller workspace and does not return outputs."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"question": "Where does `run` search?",
|
|
76
|
+
"answer": "RunMat first resolves the provided file or relative path, then searches the active MATLAB path. It appends `.m` when the supplied name has no extension, and a bare filename that already ends in `.m` is also searched on the active path."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"question": "What happens if the script creates variables?",
|
|
80
|
+
"answer": "Assignments made by the script are visible in the caller workspace after `run`. Subsequent call syntax uses MATLAB variable precedence, so a script-created array can be indexed with `x(...)` and can shadow a builtin name."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"question": "What happens if the script fails?",
|
|
84
|
+
"answer": "The error propagates to the caller and can be caught with `try`/`catch`. Assignments made before the error remain visible in the caller workspace, matching script execution semantics."
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"links": [
|
|
88
|
+
{
|
|
89
|
+
"label": "addpath",
|
|
90
|
+
"url": "./addpath"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"label": "path",
|
|
94
|
+
"url": "./path"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"label": "which",
|
|
98
|
+
"url": "./which"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"source": {
|
|
102
|
+
"label": "`crates/runmat-runtime/src/builtins/io/repl_fs/run.rs`",
|
|
103
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/io/repl_fs/run.rs"
|
|
104
|
+
},
|
|
105
|
+
"gpu_residency": "No manual action is required. `run` always executes on the host. Any GPU-resident text argument is gathered before path resolution.",
|
|
106
|
+
"gpu_behavior": [
|
|
107
|
+
"`run` is a host-side script execution boundary. It does not create GPU kernels or participate in fusion. Values created by the executed script can still be promoted by downstream acceleration heuristics."
|
|
108
|
+
],
|
|
109
|
+
"key": "run",
|
|
110
|
+
"slug": "run",
|
|
111
|
+
"aliases": [],
|
|
112
|
+
"categoryPath": [
|
|
113
|
+
"io",
|
|
114
|
+
"repl_fs"
|
|
115
|
+
]
|
|
116
|
+
};
|
|
117
|
+
export default builtinDoc;
|
|
118
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/generated/builtins/run.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE;QACV,KAAK;QACL,QAAQ;QACR,eAAe;QACf,WAAW;QACX,MAAM;KACP;IACD,SAAS,EAAE,uDAAuD;IAClE,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,mGAAmG;KAC7G;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;KACtB;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,mCAAmC;QAC3C,aAAa,EAAE;YACb,+CAA+C;YAC/C,uDAAuD;YACvD,+CAA+C;YAC/C,8CAA8C;YAC9C,oDAAoD;YACpD,qCAAqC;YACrC,kDAAkD;SACnD;KACF;IACD,aAAa,EAAE,oPAAoP;IACnQ,WAAW,EAAE;QACX,qLAAqL;QACrL,uFAAuF;QACvF,wKAAwK;QACxK,0HAA0H;QAC1H,0GAA0G;QAC1G,iJAAiJ;QACjJ,mVAAmV;KACpV;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,wCAAwC;YACvD,OAAO,EAAE,yDAAyD;SACnE;QACD;YACE,aAAa,EAAE,2CAA2C;YAC1D,OAAO,EAAE,yDAAyD;SACnE;QACD;YACE,aAAa,EAAE,+BAA+B;YAC9C,OAAO,EAAE,6EAA6E;SACvF;KACF;IACD,MAAM,EAAE;QACN;YACE,UAAU,EAAE,4BAA4B;YACxC,QAAQ,EAAE,0FAA0F;SACrG;QACD;YACE,UAAU,EAAE,2BAA2B;YACvC,QAAQ,EAAE,mGAAmG;SAC9G;QACD;YACE,UAAU,EAAE,0BAA0B;YACtC,QAAQ,EAAE,6OAA6O;SACxP;QACD;YACE,UAAU,EAAE,+CAA+C;YAC3D,QAAQ,EAAE,+NAA+N;SAC1O;QACD;YACE,UAAU,EAAE,mCAAmC;YAC/C,QAAQ,EAAE,yLAAyL;SACpM;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE,WAAW;SACnB;QACD;YACE,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,SAAS;SACjB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,wDAAwD;QACjE,KAAK,EAAE,qGAAqG;KAC7G;IACD,eAAe,EAAE,qIAAqI;IACtJ,cAAc,EAAE;QACd,6MAA6M;KAC9M;IACD,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,IAAI;QACJ,SAAS;KACV;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/step.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/step.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAmIjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -39,6 +39,7 @@ const builtinDoc = {
|
|
|
39
39
|
"Returns the response `y` as a column vector for single-output calls.",
|
|
40
40
|
"Returns `[y, tOut]` for two-output calls.",
|
|
41
41
|
"Plots the response for no-output calls.",
|
|
42
|
+
"No-output calls accept common multi-system plot syntax such as `step(sys1, 'b', sys2, 'r--', tFinal)`; style tokens are accepted for compatibility.",
|
|
42
43
|
"Chooses an automatic time vector when no time input is supplied.",
|
|
43
44
|
"Accepts a positive finite scalar final time.",
|
|
44
45
|
"Accepts a finite, nonnegative, nondecreasing explicit time vector.",
|
|
@@ -64,6 +65,11 @@ const builtinDoc = {
|
|
|
64
65
|
"description": "Plotting the step response",
|
|
65
66
|
"input": "sys = tf(1, [1 1]);\nstep(sys);",
|
|
66
67
|
"output": "A step-response plot is rendered."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"description": "Plotting multiple systems",
|
|
71
|
+
"input": "s = tf('s');\nH1 = 1/(s + 1);\nH2 = 2/(s + 2);\nstep(H1, 'b', H2, 'r--', 5);",
|
|
72
|
+
"output": "Both responses are plotted over the same final time."
|
|
67
73
|
}
|
|
68
74
|
],
|
|
69
75
|
"faqs": [
|
|
@@ -88,6 +94,10 @@ const builtinDoc = {
|
|
|
88
94
|
{
|
|
89
95
|
"label": "plot",
|
|
90
96
|
"url": "./plot"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"label": "stepinfo",
|
|
100
|
+
"url": "./stepinfo"
|
|
91
101
|
}
|
|
92
102
|
],
|
|
93
103
|
"source": {
|
|
@@ -97,17 +107,18 @@ const builtinDoc = {
|
|
|
97
107
|
"syntax": {
|
|
98
108
|
"example": {
|
|
99
109
|
"description": "Supported forms",
|
|
100
|
-
"input": "step(sys)\ny = step(sys)\n[y, tOut] = step(sys)\n[y, tOut] = step(sys, tFinal)\n[y, tOut] = step(sys, t)",
|
|
110
|
+
"input": "step(sys)\nstep(sys1, style1, sys2, style2, tFinal)\ny = step(sys)\n[y, tOut] = step(sys)\n[y, tOut] = step(sys, tFinal)\n[y, tOut] = step(sys, t)",
|
|
101
111
|
"output": "Response data is returned when outputs are requested; otherwise a plot is rendered."
|
|
102
112
|
},
|
|
103
113
|
"points": [
|
|
104
114
|
"`sys` must be a SISO `tf` object.",
|
|
105
115
|
"`tFinal` is a positive finite scalar final time.",
|
|
106
|
-
"`t` is a finite, nonnegative, nondecreasing numeric time vector."
|
|
116
|
+
"`t` is a finite, nonnegative, nondecreasing numeric time vector.",
|
|
117
|
+
"Multiple-system style arguments are supported only for no-output plotting calls."
|
|
107
118
|
]
|
|
108
119
|
},
|
|
109
120
|
"validation": {
|
|
110
|
-
"summary": "`step` validates object class, coefficient type, properness, sample time, and time-vector inputs before simulation. Unit and integration tests cover first-order response values, scalar final time, explicit vectors, discrete sample-time behavior, multi-output ordering, and VM dispatch.",
|
|
121
|
+
"summary": "`step` validates object class, coefficient type, properness, sample time, and time-vector inputs before simulation. Unit and integration tests cover first-order response values, scalar final time, explicit vectors, discrete sample-time behavior, multi-output ordering, multi-system statement-form plotting syntax, and VM dispatch.",
|
|
111
122
|
"implementation": {
|
|
112
123
|
"label": "`crates/runmat-runtime/src/builtins/control/step.rs`",
|
|
113
124
|
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/step.rs"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/generated/builtins/step.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE;QACV,MAAM;QACN,eAAe;QACf,gBAAgB;QAChB,mBAAmB;QACnB,IAAI;KACL;IACD,SAAS,EAAE,sGAAsG;IACjH,YAAY,EAAE;QACZ,sCAAsC;KACvC;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAA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AAsD;QAC/D,KAAK,EAAE,mGAAmG;KAC3G;IACD,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/generated/builtins/step.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE;QACV,MAAM;QACN,eAAe;QACf,gBAAgB;QAChB,mBAAmB;QACnB,IAAI;KACL;IACD,SAAS,EAAE,sGAAsG;IACjH,YAAY,EAAE;QACZ,sCAAsC;KACvC;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,0HAA0H;KACpI;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;QACrB,OAAO,EAAE,2EAA2E;KACrF;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,gCAAgC;QACxC,aAAa,EAAE,mCAAmC;KACnD;IACD,aAAa,EAAE,uKAAuK;IACtL,WAAW,EAAE;QACX,oDAAoD;QACpD,sEAAsE;QACtE,2CAA2C;QAC3C,yCAAyC;QACzC,qJAAqJ;QACrJ,kEAAkE;QAClE,8CAA8C;QAC9C,oEAAoE;QACpE,uDAAuD;KACxD;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,kDAAkD;YACjE,OAAO,EAAE,0CAA0C;YACnD,QAAQ,EAAE,6BAA6B;SACxC;QACD;YACE,aAAa,EAAE,2BAA2B;YAC1C,OAAO,EAAE,6CAA6C;YACtD,QAAQ,EAAE,YAAY;SACvB;QACD;YACE,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,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepinfo.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/stepinfo.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA0GjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "stepinfo",
|
|
5
|
+
"category": "control",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"stepinfo",
|
|
8
|
+
"step response",
|
|
9
|
+
"rise time",
|
|
10
|
+
"settling time",
|
|
11
|
+
"overshoot",
|
|
12
|
+
"control system"
|
|
13
|
+
],
|
|
14
|
+
"summary": "Compute step-response metrics from SISO models or sampled responses.",
|
|
15
|
+
"references": [
|
|
16
|
+
"title: \"MATLAB stepinfo documentation\""
|
|
17
|
+
],
|
|
18
|
+
"gpu_support": {
|
|
19
|
+
"elementwise": false,
|
|
20
|
+
"reduction": false,
|
|
21
|
+
"precisions": [],
|
|
22
|
+
"broadcasting": "none",
|
|
23
|
+
"notes": "`stepinfo` gathers sampled data and computes metrics on the host."
|
|
24
|
+
},
|
|
25
|
+
"fusion": {
|
|
26
|
+
"elementwise": false,
|
|
27
|
+
"reduction": false,
|
|
28
|
+
"max_inputs": 0,
|
|
29
|
+
"constants": "inline",
|
|
30
|
+
"notes": "`stepinfo` returns a metrics struct and is not fused."
|
|
31
|
+
},
|
|
32
|
+
"requires_feature": null,
|
|
33
|
+
"tested": {
|
|
34
|
+
"unit": "builtins::control::stepinfo::tests",
|
|
35
|
+
"integration": "crates/runmat-vm/tests/control.rs"
|
|
36
|
+
},
|
|
37
|
+
"description": "`stepinfo(sys)` simulates the step response for a supported SISO `tf` model and returns response metrics. `stepinfo(y, t, yfinal)` computes metrics from sampled response data.",
|
|
38
|
+
"behaviors": [
|
|
39
|
+
"Supports `stepinfo(sys)` for SISO `tf` models supported by `step`.",
|
|
40
|
+
"Supports sampled forms `stepinfo(y)`, `stepinfo(y, t)`, and `stepinfo(y, t, yfinal)`.",
|
|
41
|
+
"Returns a struct with `RiseTime`, `TransientTime`, `SettlingTime`, `SettlingMin`, `SettlingMax`, `Overshoot`, `Undershoot`, `Peak`, `PeakTime`, and `SteadyStateValue`.",
|
|
42
|
+
"Uses a default settling-time threshold of 2%.",
|
|
43
|
+
"Accepts the name-value option `'SettlingTimeThreshold'` with a scalar value between 0 and 1.",
|
|
44
|
+
"Rise-time crossings are linearly interpolated between adjacent samples."
|
|
45
|
+
],
|
|
46
|
+
"examples": [
|
|
47
|
+
{
|
|
48
|
+
"description": "Metrics from a transfer function",
|
|
49
|
+
"input": "s = tf('s');\nT = feedback(2/(s + 1), 1);\ninfo = stepinfo(T);\ninfo.Overshoot",
|
|
50
|
+
"output": "ans = 0"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"description": "Metrics from sampled data",
|
|
54
|
+
"input": "t = 0:0.1:5;\ny = 1 - exp(-t);\ninfo = stepinfo(y, t, 1);\ninfo.SteadyStateValue",
|
|
55
|
+
"output": "ans = 1"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"faqs": [
|
|
59
|
+
{
|
|
60
|
+
"question": "Does `stepinfo` require a transfer-function model?",
|
|
61
|
+
"answer": "No. It can also operate on sampled response vectors."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"question": "Are the metrics exact analytical values?",
|
|
65
|
+
"answer": "For model inputs, metrics are computed from the sampled `step` response. Crossings are linearly interpolated from those samples."
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"links": [
|
|
69
|
+
{
|
|
70
|
+
"label": "step",
|
|
71
|
+
"url": "./step"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"label": "dcgain",
|
|
75
|
+
"url": "./dcgain"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"source": {
|
|
79
|
+
"label": "`crates/runmat-runtime/src/builtins/control/stepinfo.rs`",
|
|
80
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/stepinfo.rs"
|
|
81
|
+
},
|
|
82
|
+
"syntax": {
|
|
83
|
+
"example": {
|
|
84
|
+
"description": "Supported forms",
|
|
85
|
+
"input": "info = stepinfo(sys)\ninfo = stepinfo(y)\ninfo = stepinfo(y, t)\ninfo = stepinfo(y, t, yfinal)\ninfo = stepinfo(..., 'SettlingTimeThreshold', tol)",
|
|
86
|
+
"output": "info is a scalar struct of response metrics."
|
|
87
|
+
},
|
|
88
|
+
"points": [
|
|
89
|
+
"`sys` must be a supported SISO `tf` object.",
|
|
90
|
+
"`y` and `t` must be finite real vectors with the same number of samples.",
|
|
91
|
+
"`t` must be nondecreasing.",
|
|
92
|
+
"`yfinal` must be a finite scalar when supplied."
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"validation": {
|
|
96
|
+
"summary": "`stepinfo` validates system inputs, sampled data shape, finite values, time ordering, final value, and settling-threshold options. Tests cover sampled metrics, system metrics through `step` and `dcgain`, and VM control workflows.",
|
|
97
|
+
"implementation": {
|
|
98
|
+
"label": "`crates/runmat-runtime/src/builtins/control/stepinfo.rs`",
|
|
99
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/control/stepinfo.rs"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"gpu_residency": "`stepinfo` returns a host struct.",
|
|
103
|
+
"key": "stepinfo",
|
|
104
|
+
"slug": "stepinfo",
|
|
105
|
+
"aliases": [],
|
|
106
|
+
"categoryPath": [
|
|
107
|
+
"control"
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
export default builtinDoc;
|
|
111
|
+
//# sourceMappingURL=stepinfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepinfo.js","sourceRoot":"","sources":["../../../src/generated/builtins/stepinfo.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE;QACV,UAAU;QACV,eAAe;QACf,WAAW;QACX,eAAe;QACf,WAAW;QACX,gBAAgB;KACjB;IACD,SAAS,EAAE,sEAAsE;IACjF,YAAY,EAAE;QACZ,0CAA0C;KAC3C;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,MAAM;QACtB,OAAO,EAAE,mEAAmE;KAC7E;IACD,QAAQ,EAAE;QACR,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,QAAQ;QACrB,OAAO,EAAE,uDAAuD;KACjE;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE;QACR,MAAM,EAAE,oCAAoC;QAC5C,aAAa,EAAE,mCAAmC;KACnD;IACD,aAAa,EAAE,iLAAiL;IAChM,WAAW,EAAE;QACX,oEAAoE;QACpE,uFAAuF;QACvF,yKAAyK;QACzK,+CAA+C;QAC/C,8FAA8F;QAC9F,yEAAyE;KAC1E;IACD,UAAU,EAAE;QACV;YACE,aAAa,EAAE,kCAAkC;YACjD,OAAO,EAAE,gFAAgF;YACzF,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,aAAa,EAAE,2BAA2B;YAC1C,OAAO,EAAE,kFAAkF;YAC3F,QAAQ,EAAE,SAAS;SACpB;KACF;IACD,MAAM,EAAE;QACN;YACE,UAAU,EAAE,oDAAoD;YAChE,QAAQ,EAAE,sDAAsD;SACjE;QACD;YACE,UAAU,EAAE,0CAA0C;YACtD,QAAQ,EAAE,kIAAkI;SAC7I;KACF;IACD,OAAO,EAAE;QACP;YACE,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,UAAU;SAClB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,0DAA0D;QACnE,KAAK,EAAE,uGAAuG;KAC/G;IACD,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE,oJAAoJ;YAC7J,QAAQ,EAAE,8CAA8C;SACzD;QACD,QAAQ,EAAE;YACR,6CAA6C;YAC7C,0EAA0E;YAC1E,4BAA4B;YAC5B,iDAAiD;SAClD;KACF;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,uOAAuO;QAClP,gBAAgB,EAAE;YAChB,OAAO,EAAE,0DAA0D;YACnE,KAAK,EAAE,uGAAuG;SAC/G;KACF;IACD,eAAe,EAAE,mCAAmC;IACpD,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,SAAS;KACV;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tf.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/tf.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"tf.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/tf.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UAmKjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|