how can I multiplying matrix elements
古いコメントを表示
How can I multiple elements of one column or row of a matrix?
回答 (1 件)
Image Analyst
2012 年 11 月 5 日
% Multiply a row by some number.
theRow = 42; % or whatever.
myMatrix(theRow, :) = someNumber * myMatrix(theRow, :);
% Multiply a column by some number.
theColumn = 13; % or whatever.
myMatrix(:, theColumn) = someNumber * myMatrix(:, theColumn);
1 件のコメント
Amir Ehsani
2012 年 11 月 5 日
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!