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!