dealers

deal inputs to outputs. caters for cases where the number of input and output arguments do not match
154 Downloads
Updated 25 Aug 2011

View License

% 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
%

Cite As

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

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Antennas, Microphones, and Sonar Transducers in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0