Question: Using MATLAB please!!! 5. As we have derived in class, given N subintervals set Dh, the external force component is integrated as Ii+1/2 f(x) dx,
Using MATLAB please!!!

5. As we have derived in class, given N subintervals set Dh, the external force component is integrated as Ii+1/2 f(x) dx, if i=1, Ti+1/2 f(x) dx, if i = 2, ,N, Jx1-1/2 f(x) dx if i = N +1. X 1-1/2 To avoid symbolic calculations, approximate each of the above integrations by Fi = f(xi)Axi for i = 1, ... N +1. (5.6) Construct a MATLAB function that returns the above diagonal matrix. A skeleton of this function is listed below, from which you can complete the rest of the operations. Make sure that you take the MATLAB's vectorized calculation/operations. You should be able to avoid for loop. = function [F] assemble_force_vector(mesh, bvpdata) % % Returns a vector resulting from approximation of external force % % fill the following array. F; % values according to Eq. (5.6) end 5. As we have derived in class, given N subintervals set Dh, the external force component is integrated as Ii+1/2 f(x) dx, if i=1, Ti+1/2 f(x) dx, if i = 2, ,N, Jx1-1/2 f(x) dx if i = N +1. X 1-1/2 To avoid symbolic calculations, approximate each of the above integrations by Fi = f(xi)Axi for i = 1, ... N +1. (5.6) Construct a MATLAB function that returns the above diagonal matrix. A skeleton of this function is listed below, from which you can complete the rest of the operations. Make sure that you take the MATLAB's vectorized calculation/operations. You should be able to avoid for loop. = function [F] assemble_force_vector(mesh, bvpdata) % % Returns a vector resulting from approximation of external force % % fill the following array. F; % values according to Eq. (5.6) end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
