divide array to multiple varible of array
1 次查看(过去 30 天)
显示 更早的评论
i would like to divide an array to group of variables's array
i have this array:
node=[ 2 4 6];
and i want to have the following:
[a b c]=node;
i want to store every value in the (node) to differeant variable accordingly so i will have
a=2;
b=4;
c=6;
is that possible
thank you
0 个评论
采纳的回答
Raj
2019-12-4
For the purpose of storing you can use a structure something like this:
MyStructure = struct('Name', {{'a' 'b' 'c'}}, 'Value', [2 4 6])
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!