HOW TO SELECT ELEMENTS FROM DIFFERENT MATRIX
이전 댓글 표시
Hello every one an trying to select elements from three different matrices which is stored in a template but the output is not correct. Following is my requirment.
harmony.Sol %template consisting of three 1x6 matrices as shown below:
[1 2 3 4 5 6]
[7 8 9 1 2 3]
[ 4 5 6 7 8 9]
i need to select random elements from above three matrices and create a new 1x6 matrix. probably named harmony.new. Ex: ans= [7 5 3 1 5 9]
Please help me on this, my codes are not giving the correct output. Thank u...
댓글 수: 3
Walter Roberson
2018년 2월 8일
If harmony.Sol is three 1 x 6 matrices, are they stored as a cell array, or is harmony a non-scalar structure with the three arrays being harmony(1).Sol, harmony(2).Sol, harmony(3).Sol ?
Is it correct that the rule is that each element must be chosen from one of the three elements in the corresponding positions of the Sol arrays?
PRANAY DISHAN
2018년 2월 8일
Walter Roberson
2018년 2월 8일
If harmony is a non-scalar structure, then which entry in harmony should get the new value? It is not possible to have a structure which is non-scalar with respect to some fields but scalar with respect to other fields.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!