Multiplying two columns in a matrix
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi
I have loaded a text file into a matrix using dlmread function. this has 17 columns.. and now i want to add another column that is the multyplication of the 17th column and the 15th column. how do I do so?
thank you!!
댓글 수: 0
채택된 답변
Walter Roberson
2019년 1월 30일
YourArray(:,end+1) = YourData(:,15) .* YourData(:,17);
댓글 수: 2
Walter Roberson
2019년 1월 30일
TheNameOfYourArrayGoesRightHere(:,end+1) = TheNameOfYourArrayGoesRightHere(:,15) .* TheNameOfYourArrayGoesRightHere(:,17);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!