Multiplying two columns in a matrix
30 ビュー (過去 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 で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!