Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
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
Solved! Go to Solution.
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 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
Stuart,
this is what I'm seeing. Are you suggesting that it is a bug and not a feature?
Raiko
Try using "simplify":
(Note: you have to use M and C in explicit not M1 and C0)
Hmm! No. It doesn't work on your worksheet!
Alan
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
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
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