Someone here may be able to help, but this question would be better directed to a matlab forum (or if you really think the file is correct then the vtk forum, but I suspect the issue is how the matlab code created the file).
This is solved. It was an issue with the VTK file. I’ve figured it out!
I was using the OpenEP platform to import CARTO data, so the following solution will be how to generate VTK’s from OpenEP using vtkwrite in Matlab.
x = userdata.surface.triRep.X(1:end,1);
y = userdata.surface.triRep.X(1:end,2);
z = userdata.surface.triRep.X(1:end,3);
vtkwrite('mesh.vtk','polydata','triangle',x,y,z,userdata.surface.triRep.Triangulation);