The geometry of a ship hull Wigley hull can be modeled by th
The geometry of a ship hull (Wigley hull) can be modeled by the equation y = MinusPlus 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 lessthaorequalto x lessthaorequalto 2, and -0.5 lessthaorequalto z lessthaorequalto 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 4 10 15 1 4 10 20 35]
Solution
13)
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 (Wigley hull) can be modeled by the equation y = MinusPlus B/2 [1 - (2x/L)^2] [1 - (2z/T)^2] where x, y, and z are the length, widt The geometry of a ship hull (Wigley hull) can be modeled by the equation y = MinusPlus B/2 [1 - (2x/L)^2] [1 - (2z/T)^2] where x, y, and z are the length, widt](/WebImages/35/the-geometry-of-a-ship-hull-wigley-hull-can-be-modeled-by-th-1102265-1761582677-0.webp)