Skip to content

Commit

Permalink
更正Lang.Owner中的错别字
Browse files Browse the repository at this point in the history
  • Loading branch information
埃博拉酱 committed Apr 3, 2023
1 parent 49e393a commit 7bfb15d
Show file tree
Hide file tree
Showing 15 changed files with 136 additions and 50 deletions.
2 changes: 1 addition & 1 deletion +MATLAB/+Lang/Owner.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef Owner<handle&matlab.mixin.indexing.RedefinesDot
%为句柄对象制定一个所有者,托管其生命周期
%为句柄对象指定一个所有者,托管其生命周期
%MATLAB句柄对象维护一个引用计数。只有在引用计数为0时,才会调用其delete方法,释放资源。但是MATLAB系统也会维护一些不在工作区中显示的内部全局对象(如串口、计时器回调
% 等),如果让这些内部对象持有了句柄对象的引用,那么即使在工作区中清空变量,对象的引用计数仍然不为0,不会delete,因而也不会释放资源。这就造成了一种隐患:一个句柄对
% 象可能忘记delete就从工作区中被清除,而该对象仍然被不可访问的内部全局对象引用着而无法触发自动delete,其所持有的资源也就永远无法被释放,直到MATLAB会话结束。
Expand Down
Binary file added +MATLAB/+RandFun/RandAnyDist.mlx
Binary file not shown.
Binary file added +MATLAB/+RandFun/RandOnSphere.mlx
Binary file not shown.
Binary file removed +MATLAB/RandAnyDist.mlx
Binary file not shown.
2 changes: 1 addition & 1 deletion +MATLAB/Version.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function V = Version
V.Me='v11.4.0';
V.Me='v12.0.0';
V.MATLAB='R2021a';
persistent NewVersion
try
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [+IOFun](#IOFun)
- [+Lang](#Lang)
- [+Ops](#Ops)
- [+RandFun](#RandFun)
- [+SpecFun](#SpecFun)
- [+SupportPkg](#SupportPkg) 一键获取MATLAB硬件支持包
- [+UITools](#UITools)
Expand All @@ -36,8 +37,6 @@ 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)
Expand Down Expand Up @@ -241,6 +240,13 @@ function USet = UnionN(Dimension,varargin)
%内置unique的升级版,支持任意数组类型,并可以指定拆分维度,missing类值视为相等的有效数据
function [C,ia,ic] = UniqueN(A,Dimension)
```
## +RandFun
```MATLAB
%生成任意概率分布密度的随机数
function varargout = RandAnyDist(PDF,Size,Range)
%生成单位球面上均匀分布的随机点
function [X,Y,Z] = RandOnSphere(varargin)
```
## +SpecFun
```MATLAB
%穷举一定长度的所有可能的逻辑向量
Expand Down
156 changes: 110 additions & 46 deletions resources/functionSignatures.json
Original file line number Diff line number Diff line change
Expand Up @@ -854,19 +854,19 @@
}
]
},
"MATLAB.ElMat.CutCat":{
"inputs":[
"MATLAB.ElMat.CutCat": {
"inputs": [
{
"name":"Dimension",
"kind":"required",
"type":"positive",
"purpose":"拼接维度"
"name": "Dimension",
"kind": "required",
"type": "positive",
"purpose": "拼接维度"
},
{
"name":"Array",
"kind":"required",
"repeating":true,
"purpose":"要拼接的数组"
"name": "Array",
"kind": "required",
"repeating": true,
"purpose": "要拼接的数组"
}
]
},
Expand Down Expand Up @@ -2595,6 +2595,106 @@
}
]
},
"MATLAB.RandFun.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.RandFun.RandOnSphere": {
"inputs": [
{
"name": "s",
"kind": "ordered",
"type": "RandStream"
},
{
"mutuallyExclusiveGroup": [
{
"name": "sz",
"kind": "required",
"type": [
"numeric",
"scalar",
"integer",
">=0"
],
"repeating": true
},
{
"name": "sz",
"kind": "required",
"type": [
"numeric",
"vector",
"integer",
">=0"
]
},
{
"name": "n",
"kind": "ordered",
"type": [
"numeric",
"scalar",
"integer",
">=0"
]
}
]
},
{
"mutuallyExclusiveGroup": [
{
"name": "classname",
"kind": "ordered",
"type": "choices={'double', 'single'}"
},
[
{
"name": "'like'",
"kind": "required",
"type": "choices={'like'}"
},
{
"name": "p",
"kind": "required"
}
]
]
}
]
},
"MATLAB.SpecFun.LogicalExhaustion": {
"inputs": [
{
Expand Down Expand Up @@ -3021,42 +3121,6 @@
}
]
},
"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": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="+RandFun" type="File"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="1" type="DIR_SIGNIFIER"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="RandOnSphere.mlx" type="File"/>

0 comments on commit 7bfb15d

Please sign in to comment.