From 240dabaf44b0879cd0259aa920a43fae27cb0d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9F=83=E5=8D=9A=E6=8B=89=E9=85=B1?= Date: Sun, 26 Mar 2023 12:34:12 +0800 Subject: [PATCH] RandAnyDist --- +MATLAB/+Lang/MatlabException.m | 2 + +MATLAB/RandAnyDist.mlx | Bin 0 -> 7273 bytes README.md | 2 + resources/functionSignatures.json | 36 ++++++++++++++++++ .../NZdX8mFhIb9r9HqYzGlLPFmWHHEd.xml | 6 +++ .../NZdX8mFhIb9r9HqYzGlLPFmWHHEp.xml | 2 + 6 files changed, 48 insertions(+) create mode 100644 +MATLAB/RandAnyDist.mlx create mode 100644 resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/NZdX8mFhIb9r9HqYzGlLPFmWHHEd.xml create mode 100644 resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/NZdX8mFhIb9r9HqYzGlLPFmWHHEp.xml diff --git a/+MATLAB/+Lang/MatlabException.m b/+MATLAB/+Lang/MatlabException.m index 7f3174c..26443f6 100644 --- a/+MATLAB/+Lang/MatlabException.m +++ b/+MATLAB/+Lang/MatlabException.m @@ -29,6 +29,8 @@ MEX_exception(26) FillData_larger_than_NumBytes(27) + NumWantNew_is_too_big(239) + Range_is_not_a_numerical_type(240) Invalid_RestartDisposition(241) PathManager_not_installed(242) Number_of_EdgeColors_does_not_match_number_of_lines(243) diff --git a/+MATLAB/RandAnyDist.mlx b/+MATLAB/RandAnyDist.mlx new file mode 100644 index 0000000000000000000000000000000000000000..dd6bba76ab3d8829bae540c6c21a49160794defb GIT binary patch literal 7273 zcma)B1ymf%wjEr91(yVZOBj66;1=B7eXt1(76=kFNFZ2(yW0?gy9c)*!8N$Mf9`+p z{~xmMed~9x>RCOj&z`B>r%vtKr7VYlhz|e&P#+o<0ADCVN(c@BI6(jao<4k|C+_F~ zwQztMse3>yoDEpr?d>XK`V`yQa3s%f(fjmbYhWU%w43jPJCK>wUl~Jk71X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-f%7|N7x90<{9_m?%ON5E6^r(8 NdOp13DU!eL{tHa|r(OU6 literal 0 HcmV?d00001 diff --git a/README.md b/README.md index 6d9c86d..774cb4e 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ function Arrows = LineFollowingArrow(XYCoordinates,options) function ProjectPaths = ListAllProjectPaths(Project) %绘制多条误差阴影线图 function Patches=MultiShadowedLines(Y,ShadowHeights,FaceAlpha,options) +%生成任意概率分布密度的随机数 +function varargout = RandAnyDist(PDF,Size,Range) %将任意维度的RGB图像转换为灰度图 function Image = Rgb2Gray(Image,Dimension) %在不破坏图连通性的前提下尝试移除节点(Try to remove the node without breaking graph connectivity) diff --git a/resources/functionSignatures.json b/resources/functionSignatures.json index 726b264..05b4b99 100644 --- a/resources/functionSignatures.json +++ b/resources/functionSignatures.json @@ -3005,6 +3005,42 @@ } ] }, + "MATLAB.RandAnyDist": { + "inputs": [ + { + "name": "PDF", + "kind": "required", + "type": [ + [ + "function_handle" + ], + [ + "symfun" + ] + ], + "purpose": "联合概率密度函数" + }, + { + "name": "Size", + "kind": "required", + "type": [ + "real", + "vector" + ], + "purpose": "要返回的随机数组的各维尺寸" + }, + { + "name": "Range", + "kind": "ordered", + "type": [ + "real", + "vector" + ], + "repeating": true, + "purpose": "每个随机变量的数值范围和数据类型" + } + ] + }, "MATLAB.Rgb2Gray": { "inputs": [ { diff --git a/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/NZdX8mFhIb9r9HqYzGlLPFmWHHEd.xml b/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/NZdX8mFhIb9r9HqYzGlLPFmWHHEd.xml new file mode 100644 index 0000000..7a6326b --- /dev/null +++ b/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/NZdX8mFhIb9r9HqYzGlLPFmWHHEd.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/NZdX8mFhIb9r9HqYzGlLPFmWHHEp.xml b/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/NZdX8mFhIb9r9HqYzGlLPFmWHHEp.xml new file mode 100644 index 0000000..6909aad --- /dev/null +++ b/resources/project/7ijvf-bEwYkM1TgRc0LIKlxzjYA/NZdX8mFhIb9r9HqYzGlLPFmWHHEp.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file