I want to round all the numbers between 0 and 0.7 to 0.7.
for i = 1:numel(efficiency_final) if(efficiency_final)<0.7 effciency_final_array = 0.7; else efficiency_final_array = efficiency_final; endend
For some reason this code never executes the if statement in the for loop. Only goes to the else statement and basically gives me the same values in efficiency_final in the efficiency_final_array.
Is there a better way of doing this?
Best Answer