Good afternoon, I have written a FEM in matlab. My code find the displacement fiel of a plate with a hole submitted to an internal pressure. My mesh is composed of 53 nodes. The coordinates (xi,yi) of all nodes are contained in a 53x2 matrix called " coordonnees ". Those 53 nodes form 80 T3 triangle elements, which connectivity is contained in a 80x3 matrix called " connectivite ". For every on the 80 elements I have find, with my FE model, the stresses to which are submitted those 80 elements. The stresses are kept in two 80x1 vector called " sigma_x " and " sigma_y ". Now, I would like to plot the mesh, and to color every triangle elements according to their value of sigma, but I don't know how to do this ? Do one of you have an idea on how to do this ? (I have found other FEM code that users have shared, that do something similar, but in their code they plot for exemple the displacement field, which is given for every single nodes of the mesh, so the atributed a color to the node. My problem is different in the way that my vector sigma_x gives the stress for every single elements and not every single nodes).
Thank you very much for your time and help!