Multiple variables assignment varargout=multiAssig(varargin)
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
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |