Matlab symbolic variables depending on time "t" and call of symbolic vector elements
Show older comments
Hi everybody :)
I have the following problem :
syms t x(t) y(t) z(t) theta1(t) theta2(t)
Y = [0 cos(theta1);1 sin(theta2)] * [x y]'
now the first problem is that when I call the first element of the vector V with the command "V(1)" I does't become the first element of the vecotr V but rather the hole vector with 1 instead of t, I mean :
cos(theta1(1))*conj(y(1))
conj(x(1)) + conj(y(1))*sin(theta2(1))
but what I want is this :
cos(theta1(t))*conj(y(t))
I mean only the first element which depends on t that I defined at the first of the script .
now the second little problem is that I want to give to theta1 and the other symbolic variables a start value but when I write this :
theta1(0) = 5 I become an error :
Error using symfun>validateArgNames (line 165) Second input must be a scalar or vector of unique symbolic variables.
Error in symfun (line 42) y.vars = validateArgNames(inputs);
Error in sym/subsasgn (line 1640) C = symfun(B,[inds{:}]);
Error in test (line 9) theta1(0)=5
thx for helping me !! :)
Accepted Answer
More Answers (0)
Categories
Find more on Operations on Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!