Question: Problem 1.1 Use the MATLAB gradient function to implement the function (Fx, Fy] = field2D (xGrid, yGrid, PHI) whose objective is to approximate the field
Problem 1.1 Use the MATLAB gradient" function to implement the function (Fx, Fy] = field2D (xGrid, yGrid, PHI) whose objective is to approximate the field F=-vo generated by the potential O in each point of a mesh. In the vectors xGrid ERNx+1, yGrid RNy+1, the uniform discretizations in both directions are stored; where xGrid(Nx+1) - XGrid(1) yGrid(Ny+1) - Grid(1) hx hy Nx Ny 9 O is a matrix in R(Ny+1)*(Nx+1) whose input 0 (i, j) represents the potential at the node (xj, yi), for all i = 1, ..., Ny+1, and j = 1, ..., Nx +1. The routine returns two arrays; Fx, and Fy of R(Ny+1)*(Nx+1) whose input (j, i) represents the components of field F at node (xi, and yj), respectively. Problem 1.1 Use the MATLAB gradient" function to implement the function (Fx, Fy] = field2D (xGrid, yGrid, PHI) whose objective is to approximate the field F=-vo generated by the potential O in each point of a mesh. In the vectors xGrid ERNx+1, yGrid RNy+1, the uniform discretizations in both directions are stored; where xGrid(Nx+1) - XGrid(1) yGrid(Ny+1) - Grid(1) hx hy Nx Ny 9 O is a matrix in R(Ny+1)*(Nx+1) whose input 0 (i, j) represents the potential at the node (xj, yi), for all i = 1, ..., Ny+1, and j = 1, ..., Nx +1. The routine returns two arrays; Fx, and Fy of R(Ny+1)*(Nx+1) whose input (j, i) represents the components of field F at node (xi, and yj), respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
