how can I multiplying matrix elements

4 ビュー (過去 30 日間)
Amir Ehsani
Amir Ehsani 2012 年 11 月 5 日
How can I multiple elements of one column or row of a matrix?

回答 (1 件)

Image Analyst
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
Amir Ehsani 2012 年 11 月 5 日
i want to multiple a(1,1)*a(1,2)*...*a(1,n)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by