Sử dụng chức năng linspace và phương pháp thặng dư để tạo ra một vector A với 15 giá trị bằng nhau, bắt đầu với và kết thúc với 47,5. Giải pháp. Sử dụng linspace, trong cửa sổ lệnh, chúng tôi loạiPhi tuyến chức năng: khối lượng so với bán kính bên ngoài | Chapter 3 MATLAB and Problem Solving 81 Solution. The complex number is downloaded as N-13-71 We can use either i or j for the imaginary number. The three problems can be straightforwardly solved. In particular. abs N ans b. angle N ans conj N ans Example . For a shell with an external diameter f 10 and internal diameter 1 2 2. find the volume which is given by the following formula Solution. To solve this problem the MATLAB statement typed in the Command Window is rl-10 r2-2 V- 4 pi 3 rlA3-r2A3 Here we use the pi which is the constant a. Then using the numerical result displayed V - 003 we conclude that F 4155. Example . For a shell with an external diameter f 3 4 5 6 7. 8. 9. and 10 and internal diameter 1 2 2 find the values for volume V r - r . Calculate and plot a nonlinear function V - Xn for the r given. Solution. In the MATLAB Command Window we type rl-3 l 10 r2-2 V- 4 pi 3 plot V rl Then values for J are found to be V - 003 0 0796 To plot the nonlinear function Ỉ n we have rl-3 l 10 r2-2 V- 4 pi 3 rl. 3-r2 3 plot V rl and the plot is illustrated in Figure . Chapter 3 Ma tlab and Problem Solving 82 101-- ---- ---------- --- --- ---- ------- 9 8 - - 7- - 6 z 5 - 4 f - 0 500 1000 1500 2000 2500 3000 3500 4000 4500 Figure . Nonlinear function volume versus the external radius u ri Example . Use the 1 inspace function and increment method to create a vector A with 15 equally spaced values beginning with and ending with . Solution. Using linspace in the Command Window we type linaqp ce 15 where is the first initial value is the final value and 15 is the number of values to be displayed. Pressing the Enter key the following is displayed in the Command Window A Columns 1 through 9 Columns 10 through 15 .