MATLAB: How to use a value in an array as the argument in a function in matrix multiplication

matrix array

Hello community,
I'm sorry if the title is confusing, I'll explain:
I have a vector X = [x y theta kappa]';
I trying to find the matrix F where B = F*X; and
where B = [x+cos(theta) y+sin(theta) kappa x+y]';
The problem for me is putting the X(3) which is theta, into a form that it's the argument of the sin and cos functions.
I wanted to do this without creating an intermediate transition matrix, for example T = [cos(X(3)) sin(X(3))].
How can I find the matrix F?
It would be something like:
F = [1 0 ? 0; 0 1 ? 0; 0 0 0 1; 1 1 0 0];
Thanks for the help!

Best Answer

You cannot do that using just matrix multiplication. Matrix multiplication creates linear combinations, but sin() and cos() are non-linear.