Hi everyone,
I am trying to implement a derived class from the 'triangulation' class available in Matlab 2014. The aim is to introduce additional properties and methods. I tried to mimic the example available in the Matlab documentation, but I failed even in creating a simple constructor. The minimal example is the following
classdef mymesh < triangulation properties Obj = []; end methods % constructor
function primal = mymesh(P,T,M) % M is the object code
primal = primal@triangulation(T,P); primal.Obj = M; end end end
But trying to call it with the code
P = [0 0 0; 0 1 0; 1 1 0; 1 1 1];T = [1 2 3 4];M = ones(size(T,1),1);c = mymesh(P,T,M);
makes Matlab crash. Can anyone point my were I am wrong?
Thank you in advance
Fabio
Best Answer