Hi,
I have simplified my problem, in the code below. Basically, every time I run this code, and request function "pos" with the following command:
a=classa.pos
I receive the following error:
Index exceeds matrix dimensions.Error in c/pos (line 15) p=obj.x(m)
Hopefully someone can tell me what I am doing wrong. Thank you.
classdef class<handle properties m=[]; x=[]; end methods function obj=c() end function [x,m]=pos(obj) x=[2 3] m=[1] p=obj.x(m) end end end
Best Answer