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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Explicit problem

Raiko
17-Peridot

Explicit problem

Hi there,

I have this little routine (see attached file MC15, Win 7) where I read in parameters from an excel file. For a better oversight of used values I display the assigned values by the explicit command. The catch is, even when restricting it by not using the keyword ALL, it displays all steps back to the very beginning; i.e. when read in from excel.

Is there a way to limit the steps back of the explicit function?

Raiko

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:Raiko)

Raiko Milanovic wrote:

Stuart,

this is what I'm seeing. Are you suggesting that it is a bug and not a feature?

Raiko

Kind of, Raiko ...

I think the bug is in explicit not allowing indexed matrix elements.

I think the explicit chain result is what you should expect.  The symbolic processor knows very little about string functions and it doesn't know about READEXCEL, consequently, the symbolic processor has no idea what the values of Mat and Coeff are.  Consequently, it will simply expand what it can, and throw in a few domain guesses whilst it's at it.  One way round the symbolic processor not getting the data is to use in-line evaluation.  From a symbolic processor point of view, this then assigns the values to Mat and Coeff so that you can access them.  I've put a few notes in the attached worksheet.

Stuart

View solution in original post

6 REPLIES 6
StuartBruff
23-Emerald III
(To:Raiko)

Raiko Milanovic wrote:

Hi there,

I have this little routine (see attached file MC15, Win 7) where I read in parameters from an excel file. For a better oversight of used values I display the assigned values by the explicit command. The catch is, even when restricting it by not using the keyword ALL, it displays all steps back to the very beginning; i.e. when read in from excel.

Is there a way to limit the steps back of the explicit function?

Raiko

I don't know what you're seeing in your version of M15, Raiko, but I suspect it's not what my Win 10 M15 M040 is showing ...

Stuart

Raiko
17-Peridot
(To:StuartBruff)

Stuart,

this is what I'm seeing. Are you suggesting that it is a bug and not a feature?

Raiko

AlanStevens
17-Peridot
(To:Raiko)

Try using "simplify":

explicit.PNG

(Note: you have to use M and C in explicit not M1 and C0)

Hmm!  No. It doesn't work on your worksheet!

Alan

Raiko
17-Peridot
(To:AlanStevens)

Alaan, I've tried it but to no avail It works when I define the variables on the same sheet that invorkes the explicit but not when the values are read in from Excel.

Moreover, it shows some wonky behaviour depending on whether I've displayed the variables first or not; see attached pictures.

Raiko

StuartBruff
23-Emerald III
(To:Raiko)

Raiko Milanovic wrote:

Stuart,

this is what I'm seeing. Are you suggesting that it is a bug and not a feature?

Raiko

Kind of, Raiko ...

I think the bug is in explicit not allowing indexed matrix elements.

I think the explicit chain result is what you should expect.  The symbolic processor knows very little about string functions and it doesn't know about READEXCEL, consequently, the symbolic processor has no idea what the values of Mat and Coeff are.  Consequently, it will simply expand what it can, and throw in a few domain guesses whilst it's at it.  One way round the symbolic processor not getting the data is to use in-line evaluation.  From a symbolic processor point of view, this then assigns the values to Mat and Coeff so that you can access them.  I've put a few notes in the attached worksheet.

Stuart

Raiko
17-Peridot
(To:StuartBruff)

Thank you Stuart for your time and effort. You're right it is a bit long winded approach.

In the mantime I installed Mathcad afresh just to ensure that it's not a setup problem. Didn't change the behavior a bit.

Raiko

Announcements

Top Tags