Add letters to the first and third column of matrix
조회 수: 2 (최근 30일)
이전 댓글 표시
I want ot add letter to first columnmatrix like this:
A = [ 3 6
5 7
5 8
7 8
. ... ... ]
to be:
AA = [ G1 X 3 Y 6
G0 X 4 Y 7
G1 X 5 Y 8
G0 X 7 Y 8
. ... ....]
How can we do this G1 for odd rows and G0 for even rows
댓글 수: 0
채택된 답변
madhan ravi
2020년 7월 13일
편집: madhan ravi
2020년 7월 13일
AA = [repmat("G1",size(A(:,2))), "X "+A(:,1), "Y "+A(:,2)]
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!