cellfun(@mean, aps)
Create a list of list and take the mean
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tung
am 18 Feb. 2024
Bearbeitet: Alexander
am 18 Feb. 2024
Hi everyone
I am new to Matlab (I came from a Python background).
I have a question about creating a list of arrays and calculating their componentwise means. I know how to this in python using numpy array. I tried to apply the same logic in Matlab but somehow it does not work.
Please find below one example. I want to calculate the componentwise mean of aps. Perhaps, I used the wrong data structure for the aps?
Thank you very much.
aps = {};
for i = 1:length(locs)
aps{i} = [i i+1 i+2];
end
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Call Python from MATLAB 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!