Frage

I want to store the 9 numbers created with the for loop in a matrix. So I get a matrix for Mean_Power_after with 9 number. Now I only get one number for the Mean_Power_after. Hope that anybody can help me with this.

x = 1681;
y = 2221;

for i = x:60:y
    Power_GE_after = Velo_watt(i:i+60);
    Mean_Power_after = mean(Power_GE_after); //% mean power of every minute
end 

Keine korrekte Lösung

Andere Tipps

You are reseting the Mean_Power_after to 1 value each time you run through the loop. Declare Mean_Power_after before the loop, like you declare x and y, and then instead of setting equal to one thing each time you run through the loop, set it equal to itself PLUS that one thing. Don't know which programming language you are using so I don't know how to format it for you.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top