how can I multiplying matrix elements
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
How can I multiple elements of one column or row of a matrix?
0 Kommentare
Antworten (1)
Image Analyst
am 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 Kommentar
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!