File Exchange

image thumbnail

Multiple variables assignment varargout=multiAssi​g(varargin)

version 1.0.0.0 (107 Bytes) by Francesco
Allow multiple assignment

1 Download

Updated 04 May 2015

View License

Simple code that allows multiple assignment between two sets of variable. The two sets must have the same number of elements and listed on the same order.
%example 1
[a,b,c]=multiAssig(1,2,3)
a=1
b=2
c=3
-------------
%example 2
[outVar1,outVar2,...,outVarN]=multiAssig(inVar1,inVar2,...,inVarN)
outVar1=inVar1
outVar2=inVar2
...
outVarN=inVarN

Cite As

Francesco (2021). Multiple variables assignment varargout=multiAssig(varargin) (https://www.mathworks.com/matlabcentral/fileexchange/50730-multiple-variables-assignment-varargout-multiassig-varargin), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!