The geometry of a ship hull Wrigley hull can be modeled by t
The geometry of a ship hull (Wrigley hull) can be modeled by the equation y = B/2[1-(2x/L)^2][1-(2z/T)^2] where x, y, and z are the length, width, and height, respectively. Use MAT-LAB to make a 3-D figure of the hull as shown. Use B = 1.2, L = 4, T = 0.5, -2 lessthanorequalto x lessthanorequalto 2, and -0.5 lessthanorequalto z lessthanorequalto 0. A symmetric (5 times 5) Pascal matrix is displayed on the right. Write a MATLAB program that creates an n times n symmetric Pascal matrix. Use the program to create 4 times 4 and 7 times 7 Pascal matrices. [1 1 1 1 1 1 2 3 4 5 1 3 6 10 15 1 4 10 20 35]
Solution
N=input(‘enter the order of symmetric pascal matrix\ ,);
For i=1:n
For j=1:n
A(I,j)=factorial(i+j-2)/factorial(i-1)*factorial(j-1));
End
End
Fprintf(‘the %i x %i symmetric pasca matrix is /’n’,n,)
Mat lab output:
Enter the order of symmetric pascal matrix
4
A=
1 1 1 1
1 2 3 4
1 3 6 10
1 4 10 20
![The geometry of a ship hull (Wrigley hull) can be modeled by the equation y = B/2[1-(2x/L)^2][1-(2z/T)^2] where x, y, and z are the length, width, and height, The geometry of a ship hull (Wrigley hull) can be modeled by the equation y = B/2[1-(2x/L)^2][1-(2z/T)^2] where x, y, and z are the length, width, and height,](/WebImages/41/the-geometry-of-a-ship-hull-wrigley-hull-can-be-modeled-by-t-1126322-1761600652-0.webp)