Double summation of a matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How to implement the summation? I am not able to do this.
0 Kommentare
Antworten (2)
Matt J
am 22 Okt. 2020
In recent Matlab, you can do
sum(matrix,'all')
or more generally you can do
sum(matrix(:))
3 Kommentare
Rik
am 22 Okt. 2020
Just an addition: Since R2018b you can use the S = sum(A,vecdim) syntax. So if you happen to have a 3D array and want to sum only rows and columns you can use this:
sum(matrix,[1 2])
Matt J
am 22 Okt. 2020
Then how will i specify the limits for summation?
You can extract the appropriate sub-matrix by indexing it, e.g.,
A=rand(10);
sum(A(1:5,2:7),'all')
Matt J
am 22 Okt. 2020
The expression in your .jpg file, if it needs to be evaulated for all p,q would be
SML=conv2(ML,ones(N+1),'same')
0 Kommentare
Siehe auch
Kategorien
Mehr zu Matched Filter and Ambiguity Function finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!