clc
clear all
disp('                     In The Name Of God         ');
disp(' ')
disp(' ');
disp(' ');
m=input(' enter your weight:  ');
p0=input(' enter your density: ');
s=input(' enter your wing area:  ');
k=input(' enter your k:    ');
cd0=input(' enter your cd0:   ');
clm=input(' enter your clmax:  ');
Pmaxsl=input(' enter your Pmax: ');
p=input(' enter your density height:   ');
np=input(' enter your np:   ');
w=m*9.86;
Vminp=((2*w)/((p*s)*((3*cd0)/k)^0.5))^0.5
VminD=((2*w)/((p*s)*(cd0/k)^0.5))^0.5
VmaxR=VminD
Vs=((2*w)/(p*s*clm))^0.5
Vcmin=33*((w/s)^0.5);
Vcmax=36*((w/s)^0.5);
Vcmin
Vcmax
VmaxE=Vminp
Veminp=((2*w)/((p0*s)*((3*cd0)/k)^0.5))^0.5
H=input(char(' enter your power type,turbo or normal:  '));
switch H
    case 'turbo'
        f=0;
        f=((p/p0)^0.9)
        g=0;
        g=(2*Pmaxsl*np)
        h=0;
        h=(cd0*2*k)
        q=0;
        q=w^2
        Vmax1=((g*f)/(h*q))^0.5
    case  'normal'
        Vmax2=(((2*Pmaxsl*np)*((p/p0)^1.2))/(cd0*2*k*(w^2)))^0.5
        
end
K=input(char('  do you want minumim power ?    '));
switch K
    case 'yes'
        v=input(' enter your v: ');
        l=0;
        l=(0.5*p*(v^3)*s*cd0);
        z=0;
        z=(((2*k)*(w^2))/(p*s*v));
        Preq=l+z
    case 'no'
        CLminp=(((3*cd0)/k)^0.5);
end

      