How to add a new column into the already existing matrix after satisfying certain condition?
조회 수: 2 (최근 30일)
이전 댓글 표시
I would like to compare a condition of each newly inserted column with already existing column in the matrix. If the condition doesn't meets,then the new column should be added into the matrix. otherwise the old column should be altered into new column.
댓글 수: 0
답변 (1개)
Eng. Fredius Magige
2015년 9월 23일
편집: Eng. Fredius Magige
2015년 9월 29일
We didnt catch, be specific, assume you have C=[4 1 2; 4 8 3]; % then assume you want to add on top of it, just do C(:,4)=[8; 10]; % you can manipulation your task the same way, you get C=[4 1 2 8; 4 8 3 10]
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!