Multiplying two columns in a matrix
66 次查看(过去 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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!