
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















CONTEXT ๏ (^) Introduction to MATLAB ๏ (^) Features of MATLAB ๏ (^) MATLAB Interface ๏ (^) Basic Commands in MATLAB ๏ (^) Applications & Advantages of MATLAB ๏ (^) Laplace Equation ๏ (^) Methods (Analytical & Numerical) ๏ (^) Finite Difference Method (FDM) ๏ (^) Need of FDM
INTRODUCTION TO MATLAB ๏ (^) MATLAB stands for MATrix Laboratory. ๏ (^) Developed by Math Works. ๏ (^) It is a high-level programming language. ๏ (^) Used for numerical computations. ๏ (^) Performs matrix and mathematical operations.
FEATURES OF MATLAB ๏ (^) Easy to learn and use ๏ (^) Fast calculations ๏ (^) Simple programming ๏ (^) Built-in mathematical ๏ (^) functions ๏ (^) Creates 2D and 3D graphs ๏ (^) Solves complex problems ๏ (^) Widely used in engineering and scientific research
8
ELECTRONICS AND SEMICONDUCT OR PHYSICS Circuit design & prototyping using Simscape Electrical CONTROL SYSTEMS & MECHATRONIC S Automotive Robotics Aerospace SIGNAL PROCESSING & WIRELESS COMMUNICATIO NS Audio & video processing DEEP LEARNING & COMPUTER VISION Build, train & deploy deep neural networks Medical imagery ACADEMIC LAB WORK Mathematical modelling: quantum mechanics, matrix diagonalization , statistical mechanics
LAPLACE HEAT EQUATION (STEADY-STATE HEAT CONDUCTION)
METHOD TO SOLVE LAPLACE EQUATION
1. Analytical Method: - (^) Gives the exact solution - (^) Suitable for simple problem
NEED OF FINITE DIFFERENCE METHOD ๏ (^) Used to solve complex differential equations. ๏ (^) Provides approximate numerical solutions. ๏ (^) Useful when analytical solutions are difficult or impossible. ๏ (^) Easy to implement in MATLAB. ๏ (^) Gives accurate results with less computation time. ๏ (^) Widely used in engineering and scientific research. ๏ (^) Suitable for solving the Laplace equation.
TYPES OF FINITE DIFFERENCE METHOD The three main types are:
1. Forward Difference โ - (^) It Uses the next grid point. - (^) First-order accurate. - (^) Formula: du/dx = [u(x + h) โ u(x)] / h 2. Backward Difference - - (^) It uses the previous grid point. - (^) First-order accurate. - (^) Formula: du/dx = [u(x) โ u(x โ h)] / h 3. Central Difference โ
QUESTION : Solve โยฒT = 0 in the square region bounded by the coordinate axes and the lines x = 4 and y = 4, with the following boundary conditions: i. T(0, y) = 0, for 0 โค y โค 4 ii. T(4, y) = 12 + y, for 0 โค y โค 4 iii. T(x, 0) = 3x, for 0 โค x โค 4 iv. T(x, 4) = xยฒ, for 0 โค x โค 4
19 %% Boundary Conditions % Left Boundary (x = 0) u(:,1) = 0; % Right Boundary (x = 4) for j = 1:N y = j - 1; u(j,N) = 12 + y; end % Bottom Boundary (y = 0) for i = 1:N x = i - 1; u(1,i) = 3*x; end
20 % Top Boundary (y = 4) for i = 1:N x = i - 1; u(N,i) = x^2; end %% Gauss-Seidel Iterative Method tol = 1e-6; % Convergence tolerance error = 1; % Initial error while error > tol old = u; for j = 2:N- for i = 2:N- u(j,i) = 0.25 * ( ... u(j+1,i) + ... u(j-1,i) + ... u(j,i+1) + ... u(j,i-1) ); end