cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Derivative of Function with Vector Output

TG_10514568
4-Participant

Derivative of Function with Vector Output

I'd like to check a simple-span beam for the effects of a torsion load along the beam span. This requires some element-wise operations as well as a function for angle of rotation. Attached is the portion of the sheet where I'm running into a vector/scalar error. I'm running Prime version 7.0.

 

I'd like for the output to include the first, second and third derivatives of the angle of rotation at 3 points along the beam span (the load point in addition to both ends of the beam). Is there a good way to manipulate the matrix setup or include the derivative functions within the main function in order to produce an output?

TG_10514568_2-1715644689515.png

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:TG_10514568)

You can't define the derivative with respect to a vector (z).

I redefined your function theta so that it works with scalar arguments and then call them vectorized with the vector z as argument. Because the values of alpha vary wrt the values of z, I had to define theta and its derivatives as a function in z AND alpha.

Hope it helps. Can't save as Prime 7, so here is a full screenshot:

Werner_E_0-1715646003462.png

 

View solution in original post

2 REPLIES 2
Werner_E
25-Diamond I
(To:TG_10514568)

You can't define the derivative with respect to a vector (z).

I redefined your function theta so that it works with scalar arguments and then call them vectorized with the vector z as argument. Because the values of alpha vary wrt the values of z, I had to define theta and its derivatives as a function in z AND alpha.

Hope it helps. Can't save as Prime 7, so here is a full screenshot:

Werner_E_0-1715646003462.png

 

TG_10514568
4-Participant
(To:Werner_E)

Thanks so much for the quick response! Appreciate the help

Announcements

Top Tags