`for i=1:size(angle) if(angle(i) >= 1 || angle(i)<= 9) v1(i) =v0(i)*(1-deficit1); %affected by the x away one% downstream wind for turbine 2nd`

v2(i) =v1(i)*(1-deficit2); %affected by the x away one% downstream wind for turbine 2nd v3(i) =v2(i)*(1-deficit3); %affected by the x away one% downstream wind for turbine 2nd else end if(angle(i) >=10 || angle(i) <=170) v1(i) =v0(i); v2(i) =v0(i); v3(i) =v0(i); else end if(angle(i) >= 171 || angle(i)<= 189) v1(i)=v0(i)*(1-deficit2); %affected by the x away one% downstream wind for turbine 2nd v2(i)=v1(i)*(1-deficit1); %affected by the x away one% downstream wind for turbine 2nd% v3(i)=v2(i)*(1-deficit3) %affected by the x away one% downstream wind for turbine 2nd

else end if(angle(i) >=190 || angle(i) <=350) v1(i) =v0(i); v2(i) =v0(i); v3(i) =v0(i); else end if(angle(i) >= 351 || angle(i)<= 360) v1(i)=v0(i)*(1-deficit2); %affected by the x away one% downstream wind for turbine 2nd v2(i)=v1(i)*(1-deficit1); %affected by the x away one% downstream wind for turbine 2nd% v3(i)=v2(i)*(1-deficit3) %affected by the x away one% downstream wind for turbine 2nd else endend

# MATLAB: For loop and if else statement? it is not working with the different angle. could you please suggest me some solution

for loopif statement

###### Related Question

- How to calculate a angle between two vectors in 3D
- How to have the final vector
- How to get fprintf to display several matrices at once while maintaining the desired order
- How to shuffle two vectors
- Find Joint Angle for Animation
- Kindly,could you help me by giving me a code to analyze drag and lift forces of wind turbine
- Angle between two vectors in 3d
- Start for loop from non zero value

## Best Answer