MATLAB: Which function will cause less load to Matlab

load

By load, I mean the processing time Matlab needs.
Having 3000 lines of if statements where the statement is constant and only the condition is varied or to use a while(1) with a loop with a evalc and sprintf
while(1) is needed in the loop because it needs to be compared all the time.

Best Answer

Why is it 8 buildings?
ssn = @(sdn) round(24*3600*sdn); iso_week_day = @(sdn) 1 + rem( weekday( sdn - 2 ), 7 ); -I tried running this program in my 2011 version but I can't seem to find what is the function of this code?
I can't also understand this for iwd = 1 :7 for ts = 1 : 12 time_slot_array(ts,1,iwd) = ssn(datenum( vec + [0,0,iwd-1,7+ts, 0, 0] )); time_slot_array(ts,2,iwd) = ssn(datenum( vec + [0,0,iwd-1,7+ts,59,59] )); end end -why do you need an to add an initial date to the 2 loops?
for bb = 1 : 8 for ff = 1 : 4 for rr = 1 : 30 Building(bb).Floor(ff).Room(rr).TimeSlot = time_slot_array; end end end -There should be a specific matrix area right? i.e. time_slot_array(2,1,7)