MATLAB: How to generate a triangulation for FEM 1D problem

bvpfinite element methodgalerkin methodhat functionload vectorMATLABnodal pointsstiffness matrixweak form

I'm trying to plot Exact VS FEM solution for this equation:
with boundary condition:
I followed this code for example: Example Code
It's fine for its case, but in my case I don't know about how to get the triangulation (for my case) for this line:
x(1)=0; x(2)=0.1; x(3)=0.3; x(4)=0.333; x(5)=0.5; x(6)=0.75;x(7)=1;
How to generate the triangulation values? Does anyone know?
Thank you

Best Answer

x(1)=0*pi; x(2)=0.1*pi; x(3)=0.3*pi; x(4)=0.333*pi; x(5)=0.5*pi; x(6)=0.75*pi;x(7)=1*pi;
Best wishes
Torsten.
Related Question