- #1

- 66

- 0

**urgent:Matlab program with these equations**

Question:For an oblique shock in air, write a computer program to calculate and plot β , M2 ,p2/p1,p02/p01 versus M1 for various θ . Show the Mach wave and normal shock wave limits and the line of maximum deflection angle on the plot.

I've written the below equations but i can't write a program in MATLAB to use these,please help me.

equations:

(in the below equations: a=θ , s=β ,gam=1.4)

cot(a) = tan(s) * [{((gam+1) * M^2)/(2 * M^2 * sin^2(s) - 1)} - 1]

M1^2 * sin^2(s -a) = [(gam-1)M^2 sin^2(s) + 2] / [2 * gam * M^2 * sin^2(s) - (gam -1)]

p02 / p01 = {[(gam + 1) * M^2 * sin^2(s)]/[(gam-1)*M^2 * sin^2(s) + 2]}^[gam/((gam-1)] * {(gam+1)/[2 * gam * M^2 * sin^2(s)-(gam-1)]}^[1/(gam-1)]

p2/ p1 = [2 * gam * M^2 * sin^2(s)-(gam -1)] / (gam + 1)

(M2*sin(a-s))^2=[(1+(gam-1/2)*(M1*sin(a))^2)/(gam*(M1*sin(a))^2-(gam-1)/2)]