how can I multiplying matrix elements

4 vues (au cours des 30 derniers jours)
Amir Ehsani
Amir Ehsani le 5 Nov 2012
How can I multiple elements of one column or row of a matrix?

Réponses (1)

Image Analyst
Image Analyst le 5 Nov 2012
% 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 commentaire
Amir Ehsani
Amir Ehsani le 5 Nov 2012
i want to multiple a(1,1)*a(1,2)*...*a(1,n)

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by