how can I multiplying matrix elements

How can I multiple elements of one column or row of a matrix?

回答 (1 件)

Image Analyst
Image Analyst 2012 年 11 月 5 日

0 投票

% 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)

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

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

質問済み:

2012 年 11 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by