Multiple variables assignment varargout=multiAssi​g(varargin)

Version 1.0.0.0 (107 Bytes) by Francesco
Allow multiple assignment
77 Downloads
Updated 4 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 (2024). Multiple variables assignment varargout=multiAssig(varargin) (https://www.mathworks.com/matlabcentral/fileexchange/50730-multiple-variables-assignment-varargout-multiassig-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Characters and Strings in Help Center and MATLAB Answers
Tags Add Tags

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