How do I sum a number with only the top row of the matrix?

7 visualizzazioni (ultimi 30 giorni)
I have a 480 x 11 matrix of numbers (cash inflows) and need to sum a number, say negative 10, with the elements in the first row of the matrix only leaving the remaining elements unchanged. How can I sum this number (negative 10) with the original 480 x 11 matrix such that my output will be the same as the original matrix except that the numbers in the first row of the matrix will have been reduced by 10. Thanks!

Risposta accettata

Sean de Wolski
Sean de Wolski il 16 Giu 2014
x(1,:) = x(1,:) + -10

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by