I am trying to create a simple method within a handle class that can assign two values to a cell array. The first value is a number, just a observation number. The next value has to be two letter string. I have tried the following:
function addemp(obj, num,ini)
obj.empnam(num,:) = {num,ini};
end
Where, mednum is the observation number, and medini is the string. I have tried calling the function like this:
Addemp(m,1,'ES')
Where m is the object that holdes the empty empnam class property.
This returns the error: Assignment has more non-singleton rhs dimensions than non-singleton subscripts
So i hope my idea is pretty clear, and I do believe that it is a simple syntax error.
Thank you very much in advance
/Lasse
obj.empnam?