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

"unable to form derivative matrix" - Error [Mathcad Prime 2.0]

NS_10096872
10-Marble

"unable to form derivative matrix" - Error [Mathcad Prime 2.0]

Hi Mathcad-Community,

I am running into the following error not able to debug it. First I though, that I might have a unit mismatch but after rechecking, everything seems to be consisten so far. What is the cause for the error?

4 REPLIES 4
ppal
17-Peridot
(To:NS_10096872)

Is this what you want to do?

 

muser_0-1638306096707.png

 

Hi muser,

I am looking for the function phi(t). I have no clue, why the solve-block runs into a error. I think it might have to do something with the following equation, because when I remove J_Motor*2*Pi*n'(t), the solver is able to give me phi(t).

 

NS_10096872_1-1638351063116.png

 

ppal
17-Peridot
(To:NS_10096872)

What's the error?

 

muser_1-1638392646307.pngmuser_2-1638392727566.png

 

Werner_E
25-Diamond I
(To:ppal)


@ppal wrote:

What's the error?

 


The error is later in the solve block with odesolve!

The complicated way of substituting the functions phi and its derivates for normal variables is necessary because the solve block with odesolve unfortunately will not work if you use a function which has the solved for function as its argument. At least that was what I could come up with in another thread of the OP 😉
@NS_10096872 
In the other thread I vaguely remember a second solution which avoided the substitute method - not sure if it was posted by Fred or Stuart. Did you already try this approch?

Furthermore you may notice that, if you are using a newer version of Prime, after you recalculate the sheet, some derivates will not be substituted by phi1 or phi2. The reason is Primes infamous auto-labelling.

I played around with the worksheet for quite some while getting to get the substitute to work and finally ended up redefining the function F.W using phi0, phi1 and phi2 replaced by hand 😞

Nevertheless the solve block with odesolve does not work and still throws the error of not being able to build the matrix of derivatives.

 

No idea whats the cause and how to fix it.

 

@NS_10096872 

Are you absolutely sure about the equation in the solve block and the initial conditions?
We often had seen here in the forum people which had problems with odesolve and in the end it turned out that the model was wrong or that errors had crept into the equations used. 

 

Announcements

Top Tags