⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myvarout.m

📁 从MatlabSimulink模型到代码实现
💻 M
字号:
function [varargout]=myvarout
%MYVAROUT return variable rand output points
%This function is just a simple example of which the 
%number of output arguments is variable.

%check if the number of output points is more than zero
if nargout <1
    disp('Usage:[p1,p2,...pN]=myvarout,where N>=1');
    disp('Input output points more than zero,Please!');
    return;
end

%generate random points of which the (x,y) coordinates are 
%distributed between [0 9] with equal probability.
for i=1:nargout
    varargout{i}=[randint(1,1,10),randint(1,1,10)];
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -