Sum function on part of an array
Mostra commenti meno recenti
I don't understand what the following sum function does.
mA=zeros(M,1);
mA(1)=sum(cA(1,:))*dx;
mA is a column vector, so what does mA(1) mean?
The documentation for the sum function indicates that taking the sum of a vector just results in one value which is the sum of all of the values in the vector. Is that also what happens when you take the sum of a single row in a matrix (sum(cA(1,:)))? So is mA(1) equal to a single value? I can't seem to find out what mA(1) means for a vector.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!