matlab brute force indexing
===

Hi I am working with the brute force method to examine possible combinations of "panels" and "turbines"

My code is 

     for number_panels = 0:5
    
    for number_turbines = 0:10
        
        
        for n = 1:24 % number of hours per day
                                               
             
                                     
    deficit(n) = Demand(n) - (PV_supply(n)*number_panels) -...
     (WT_supply(n)*number_turbines);% hourly power deficit
            
            if deficit(n)<0
                
                deficit(n) = 0;
                
            end

The problem I have above is that I haven't yet figured the correct indexing of this code.

What I am trying to do is find the "deficit" for the "number_panels" , "number_turbines" and "n". As it stands I can only find the "deficit" for the last for loop. 
How can I code so that I can have the option to access the nth row (or sets of "n" i.e 1-24) and also for the "number_panels" "number_turbines" option?
