Multiple variables assignment varargout=multiAssig(varargin)
Version 1.0.0.0 (107 Bytes) by
Francesco
Allow multiple assignment
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 (2026). 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 LinuxCategories
Find more on Characters and Strings in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
