how do I subtract and then mean in every row of a data set?
Ältere Kommentare anzeigen
Say I had a 10000x10 matrix, and in every row. I wanted to take the conditional mean for columns 1-5 and 6-10, get the difference of these two means, and then make that appear in a new data set in the corresponding row. Would I use for loop? I am new to mat lab so I'm not sure how to use it Thank you
4 Kommentare
per isakson
am 22 Apr. 2015
"conditional mean for columns 1-5"   I'm not sure I understand what that is.
Image Analyst
am 22 Apr. 2015
What do you mean by "data set", and if you mean just regular numbers, then where in the 10,000 by 10 matrix do you want the difference of the two means to appear? In column 11? In column 10,001?
Clifford Wu
am 23 Apr. 2015
Bearbeitet: Clifford Wu
am 23 Apr. 2015
Clifford Wu
am 23 Apr. 2015
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!