dealers

バージョン 1.0.0.0 (1.44 KB) 作成者: Pierce Brady
deal inputs to outputs. caters for cases where the number of input and output arguments do not match
ダウンロード: 154
更新 2011/8/25

ライセンスの表示

% dealers - A dummy function for assigning inputs to outputs
%
% varargout = dummyfun(varargin)
%
% Assigns the inputs to the outputs. It is very similar to matlab's deal
% function but it caters for case where the number of inputs and outputs
% do not match.
%
% Example
% % Equal inputs and outputs
% % All inputs are assigned the output values
% [a,b,c] = dealing(1,2,3)
%
% % More inputs than outputs
% % The first 2 inputs are assigned to the outputs
% [a,b] = dealing(1,2,3)
%
% % More outputs than inputs
% % The first 2 outputs are assigned the input values
% % The remaining outputs are assigned to the last output
% [a,b,c] = dealing(1,2)
%
% % Useful for preventing errors when using anonymous function
% h = @(x,y,z)dealers(x,y,z);
% [a,b] = h(x,y,z)
%
% See also
% dealers
% deal
%

引用

Pierce Brady (2024). dealers (https://www.mathworks.com/matlabcentral/fileexchange/32686-dealers), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2009a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersAntennas, Microphones, and Sonar Transducers についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0