clc;
clear;
close all;
%%  sign function
x = -0.01 ; 
if x > 0
    y = 1
elseif x == 0
    y = 0 
else
    y = -1 
end
%% saturation  function
LB = -20 ;
UB = +20 ;
x = +30  ; 
if x > UB
    y = UB
elseif x < LB
    y = LB 
else
    y = x 
end
%% foor loop   S = sum(1+2+3+ ... +n) = n*(n+1)/2
S = 0 ; 
for  i = 1:100
    if mod(i , 2) == 0
   S = S + i ;   %% 1  3  6    
    end
end
S
%% While loop
S = 0  ;
N = 100 ; 
while i <= N
    S  = S + i ; 
    
end



