I have the following code in matlab
deltax=@(t)xt(t).'-xt(t);
deltay=@(t)yt(t).'-yt(t);
deltaz=@(t)zt(t).'-zt(t);
deltar=@(t)reshape([deltax(:) deltay(:) deltaz(:)].',3*(100+1),[]).';
where xt
, yt
, zt
are all well defined functions of t
. If I do deltax(2), I get a column array with 101 entries and similarly for deltay(2) and deltaz(2).
However when I call
deltar(2)
I get this error
Input arguments to function include colon operator. To input the colon character, use ':' instead.
I have also tried
deltar=@(t)reshape([deltax(t)(:) deltay(t)(:) deltaz(t)(:)].',3*(100+1),[]).';
but this gives me syntax errors.
I must be doing some basic matlab mistake.