Calculate Average or Mean of a matrix
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Minhaz Parveez
am 24 Sep. 2016
Beantwortet: Maneet Kaur Bagga
am 6 Jul. 2022
a=[5 2;5 6;8 8]; How to calculate the average of this matrix using function?
Answer is like (5+5+8/3,2+6+8/3)
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Maneet Kaur Bagga
am 6 Jul. 2022
Hi, Minhaz Parveez
As per my understandig you want to calculate the mean of each coloumn of the matrix. By default MATLAB fuctions work on coloumns therefore you can use the mean function directly. Please refer to the code below. Hope it helps!
X = [5 2;5 6;8 8]
mean(X)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spline Postprocessing 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!