Code covered by the BSD License  

Highlights from
dealers

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 1.44 KB File ID: #32686

dealers

by

 

deal inputs to outputs. caters for cases where the number of input and output arguments do not match

| Watch this File

File Information
Description

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

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us