Partial derivative of a time derivative

6 views (last 30 days)
Tobias
Tobias on 13 Oct 2020
Commented: Prabhan Purwar on 20 Oct 2020
Hello,
I have the following code:
syms('qxy(t)',[2,1]); qxy = formula(qxy);
u1 = formula(qxy);
u1_dot = formula(diff(u1,t));
T = diff(u1_dot(1),diff(qxy1(t), t));
Here I create a symbolic u1 with qxy1(t) and qxy2(t).
Then I take the derivative wrt time of u1 to get u1_dot, with elements diff(qxy1(t), t) and diff(qxy2(t), t).
Now I want to take the partial derivative of u1 wrt diff(qxy1(t), t) and diff(qxy2(t), t)
So in formula form for u1_dot(1):
But if I run this code, I get an error instead of the value 1.
Does someone know how to solve this?
Thanks!
  3 Comments
Tobias
Tobias on 20 Oct 2020
Hi, thank you for your comment!
Luckily I already resolved this problem by updating to version 2020b.
This wasn't possible in the 2019 version of Matlab.
Thanks!
Prabhan Purwar
Prabhan Purwar on 20 Oct 2020
Glad to know that the issue is resolved.

Sign in to comment.

Answers (1)

VBBV
VBBV on 19 Oct 2020
I don't get any error It shows the result as T = 1 as you mentioned.
%if true
% code
% end
syms('qxy(t)',[2,1]); qxy = formula(qxy);
u1 = formula(qxy);
u1_dot = formula(diff(u1,t));
T = diff(u1_dot(1),diff(qxy1(t), t));
>>
T =
1
  1 Comment
Tobias
Tobias on 20 Oct 2020
Hi,
Thanks for your reply!
I was using version 2019b, but I found out that it actually works since version 2020b.
So updating did the trick for me

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!