Effacer les filtres
Effacer les filtres

How can I log commands being executed by matlab? Like diary() but for all function calls.

16 vues (au cours des 30 derniers jours)
Hi there,
I have a GUI that wanted to log what the user interacts with. In my understading this would be which function calls are being executed in the background and their order, as the user goes about using the app.
Is there a way to tap into this "input stream" and log them into a file? Similar to diary() function but for all the function calls being executed.
My ultimate goal with this log of inputs is to be able to "replay" and rexecute the set of steps the user has made, programatically. Let me know if you suggest another aproach. I imagine this would be a large stack but I can probably come up with something to filter the relevant bits.
Thanks in advance!
  2 commentaires
Walter Roberson
Walter Roberson le 29 Sep 2023
If it were possible at all, it would have to be very extensive since quite a bit of MATLAB is implemented in MATLAB. For example if fsurf() were called, then every line of argument processing of fsurf.m would have to be traced, every test to see what was being done, every calculation to do mesh refinement... until eventually built-in graphics commands were called.
Luciano Branco
Luciano Branco le 29 Sep 2023
Modifié(e) : Luciano Branco le 29 Sep 2023
Sure, but I was thinking I could just filter based on the folder of the functions that were called. For example, using profiler as suggested by @Bruno Luong I can easily tell which functions are from my GUI and which are from Matlab.

Connectez-vous pour commenter.

Réponses (1)

Bruno Luong
Bruno Luong le 29 Sep 2023
Check out profile see if it meets your need.
  7 commentaires
Luciano Branco
Luciano Branco le 2 Oct 2023
Interesting.. I will think about these suggestions and see how they would fit our project in the upcoming weeks.
Thank you for your comments, @Walter Roberson @Bruno Luong!
Strider
Strider le 9 Juin 2024
@Luciano Branco My design space sounds similar to yours and I was approaching it with making a SQLite table(s) of known 'meta-deta' to get back to the state of a GUI. The trivial example would be recreating a tiled layout with several signals on it and having a class that can unpack that SQLite file.
I am interested to hear what solution you chose.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by