Hello,
I created this variables, some symbolic, some not:
alpha = [pi/2 0 0];a = sym('[0 a2 a3]');d = [0 0 0];theta = sym('t', [1,3]);
initializing….
C = (zeros(1, 2, 2));
and I create the element (:,:,1) as:
C(:,:,1) = [(cos(theta(1))) (-sin(theta(1)))*cos(alpha(1))];
but it returns me this error:
The following error occurred converting from sym todouble:Error using mupadmexError in MuPAD command: DOUBLE cannot convert the inputexpression into a double array.If the input expression contains a symbolic variable, usethe VPA function instead.
so I tried to set:
C = vpa(zeros(1, 2, 2));
and so it returns a strange result
C(:,:,1) = [ cos(t1), -(4967757600021511*sin(t1))/81129638414606681695789005144064]
but if cos(pi/2)=0 it should be
(-sin(theta(1)))*cos(alpha(1)) = 0
what is that long (and wrong) number ?
Best Answer