Is there a way to trigger a breakpoint with a variable call, in Matlab?Is there an established way to use configuration files for a deployed MATLAB application?How to implement concurrent programming between simulink and matlabHow to implenet a timed loop in a Matlab function blockTrying to solve ODE system in MATLAB yields the following error: “Undefined function 'exist' for input arguments of type 'cell'”Too many outputs error in MATLAB 2013aHow can I execute a simulink diagram running in external mode from a Matlab script?How to customise Matlab Simulink toolchain default values?For loop with pair-wise conditions/variables in MATLABContinue ‘for’ loop with the existing variables in MatlabUsing single variables in Simulink
Why is the sentence "Das ist eine Nase" correct?
How seriously should I take size and weight limits of hand luggage?
Is this draw by repetition?
How to show a landlord what we have in savings?
files created then deleted at every second in tmp directory
Should I tell management that I intend to leave due to bad software development practices?
Do Iron Man suits sport waste management systems?
Is it a bad idea to plug the other end of ESD strap to wall ground?
Is it possible to map the firing of neurons in the human brain so as to stimulate artificial memories in someone else?
Rotate ASCII Art by 45 Degrees
Why was Sir Cadogan fired?
Forgetting the musical notes while performing in concert
How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?
Is it possible to create a QR code using text?
Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?
How can saying a song's name be a copyright violation?
Finding the reason behind the value of the integral.
Bullying boss launched a smear campaign and made me unemployable
Avoiding the "not like other girls" trope?
How do I exit BASH while loop using modulus operator?
OP Amp not amplifying audio signal
In the UK, is it possible to get a referendum by a court decision?
Send out email when Apex Queueable fails and test it
Can compressed videos be decoded back to their uncompresed original format?
Is there a way to trigger a breakpoint with a variable call, in Matlab?
Is there an established way to use configuration files for a deployed MATLAB application?How to implement concurrent programming between simulink and matlabHow to implenet a timed loop in a Matlab function blockTrying to solve ODE system in MATLAB yields the following error: “Undefined function 'exist' for input arguments of type 'cell'”Too many outputs error in MATLAB 2013aHow can I execute a simulink diagram running in external mode from a Matlab script?How to customise Matlab Simulink toolchain default values?For loop with pair-wise conditions/variables in MATLABContinue ‘for’ loop with the existing variables in MatlabUsing single variables in Simulink
I am working on an existing project in Matlab/Simulink; written by a former co-worker. This project has dozens of variables and functions that are read/written and called, respectively. In an effort to understand the code a bit more, I'm trying to find when certain variables are being called during execution. Is there a way to trigger a flag when specific variables are being read/written? I was thinking it would be very helpful to trigger a breakpoint when a variable is read/written.
matlab simulink
add a comment |
I am working on an existing project in Matlab/Simulink; written by a former co-worker. This project has dozens of variables and functions that are read/written and called, respectively. In an effort to understand the code a bit more, I'm trying to find when certain variables are being called during execution. Is there a way to trigger a flag when specific variables are being read/written? I was thinking it would be very helpful to trigger a breakpoint when a variable is read/written.
matlab simulink
1
Variables are not called, they are read from or written to. You can search for uses of the variable name within your function, and set breakpoints on the lines found. If you are talking about global variables, you might want to stop using those exactly for this reason, it's hard to track where and when they're being modified.
– Cris Luengo
Mar 7 at 21:18
@CrisLuengo Thank you for the clarification. Unfortunately, I didn't create the code; it was passed down to me. Nevertheless, I will definitely be careful about my use of global variables. What is one way you recommend searching for the variables? Do you do this within Matlab? If not, where do you it? I ask because I tried to do this using the Windows search feature, but it didn't seem to work.
– Danny G.
Mar 7 at 21:23
Within a function, you just search with the editor. Actually the MATLAB Editor helps a lot by highlighting all occurrences of the variable name your cursor is on. With global variables it's harder, which is why they shouldn't be used. On Linux or MacOS you can use the command line utilitygrep. I don't know a good solution on Windows, haven't used that in >10 years now.
– Cris Luengo
Mar 7 at 21:29
1
Here are some ideas you could try: mathworks.com/matlabcentral/answers/…
– Cris Luengo
Mar 7 at 21:41
add a comment |
I am working on an existing project in Matlab/Simulink; written by a former co-worker. This project has dozens of variables and functions that are read/written and called, respectively. In an effort to understand the code a bit more, I'm trying to find when certain variables are being called during execution. Is there a way to trigger a flag when specific variables are being read/written? I was thinking it would be very helpful to trigger a breakpoint when a variable is read/written.
matlab simulink
I am working on an existing project in Matlab/Simulink; written by a former co-worker. This project has dozens of variables and functions that are read/written and called, respectively. In an effort to understand the code a bit more, I'm trying to find when certain variables are being called during execution. Is there a way to trigger a flag when specific variables are being read/written? I was thinking it would be very helpful to trigger a breakpoint when a variable is read/written.
matlab simulink
matlab simulink
edited Mar 7 at 21:26
Danny G.
asked Mar 7 at 21:04
Danny G.Danny G.
367
367
1
Variables are not called, they are read from or written to. You can search for uses of the variable name within your function, and set breakpoints on the lines found. If you are talking about global variables, you might want to stop using those exactly for this reason, it's hard to track where and when they're being modified.
– Cris Luengo
Mar 7 at 21:18
@CrisLuengo Thank you for the clarification. Unfortunately, I didn't create the code; it was passed down to me. Nevertheless, I will definitely be careful about my use of global variables. What is one way you recommend searching for the variables? Do you do this within Matlab? If not, where do you it? I ask because I tried to do this using the Windows search feature, but it didn't seem to work.
– Danny G.
Mar 7 at 21:23
Within a function, you just search with the editor. Actually the MATLAB Editor helps a lot by highlighting all occurrences of the variable name your cursor is on. With global variables it's harder, which is why they shouldn't be used. On Linux or MacOS you can use the command line utilitygrep. I don't know a good solution on Windows, haven't used that in >10 years now.
– Cris Luengo
Mar 7 at 21:29
1
Here are some ideas you could try: mathworks.com/matlabcentral/answers/…
– Cris Luengo
Mar 7 at 21:41
add a comment |
1
Variables are not called, they are read from or written to. You can search for uses of the variable name within your function, and set breakpoints on the lines found. If you are talking about global variables, you might want to stop using those exactly for this reason, it's hard to track where and when they're being modified.
– Cris Luengo
Mar 7 at 21:18
@CrisLuengo Thank you for the clarification. Unfortunately, I didn't create the code; it was passed down to me. Nevertheless, I will definitely be careful about my use of global variables. What is one way you recommend searching for the variables? Do you do this within Matlab? If not, where do you it? I ask because I tried to do this using the Windows search feature, but it didn't seem to work.
– Danny G.
Mar 7 at 21:23
Within a function, you just search with the editor. Actually the MATLAB Editor helps a lot by highlighting all occurrences of the variable name your cursor is on. With global variables it's harder, which is why they shouldn't be used. On Linux or MacOS you can use the command line utilitygrep. I don't know a good solution on Windows, haven't used that in >10 years now.
– Cris Luengo
Mar 7 at 21:29
1
Here are some ideas you could try: mathworks.com/matlabcentral/answers/…
– Cris Luengo
Mar 7 at 21:41
1
1
Variables are not called, they are read from or written to. You can search for uses of the variable name within your function, and set breakpoints on the lines found. If you are talking about global variables, you might want to stop using those exactly for this reason, it's hard to track where and when they're being modified.
– Cris Luengo
Mar 7 at 21:18
Variables are not called, they are read from or written to. You can search for uses of the variable name within your function, and set breakpoints on the lines found. If you are talking about global variables, you might want to stop using those exactly for this reason, it's hard to track where and when they're being modified.
– Cris Luengo
Mar 7 at 21:18
@CrisLuengo Thank you for the clarification. Unfortunately, I didn't create the code; it was passed down to me. Nevertheless, I will definitely be careful about my use of global variables. What is one way you recommend searching for the variables? Do you do this within Matlab? If not, where do you it? I ask because I tried to do this using the Windows search feature, but it didn't seem to work.
– Danny G.
Mar 7 at 21:23
@CrisLuengo Thank you for the clarification. Unfortunately, I didn't create the code; it was passed down to me. Nevertheless, I will definitely be careful about my use of global variables. What is one way you recommend searching for the variables? Do you do this within Matlab? If not, where do you it? I ask because I tried to do this using the Windows search feature, but it didn't seem to work.
– Danny G.
Mar 7 at 21:23
Within a function, you just search with the editor. Actually the MATLAB Editor helps a lot by highlighting all occurrences of the variable name your cursor is on. With global variables it's harder, which is why they shouldn't be used. On Linux or MacOS you can use the command line utility
grep. I don't know a good solution on Windows, haven't used that in >10 years now.– Cris Luengo
Mar 7 at 21:29
Within a function, you just search with the editor. Actually the MATLAB Editor helps a lot by highlighting all occurrences of the variable name your cursor is on. With global variables it's harder, which is why they shouldn't be used. On Linux or MacOS you can use the command line utility
grep. I don't know a good solution on Windows, haven't used that in >10 years now.– Cris Luengo
Mar 7 at 21:29
1
1
Here are some ideas you could try: mathworks.com/matlabcentral/answers/…
– Cris Luengo
Mar 7 at 21:41
Here are some ideas you could try: mathworks.com/matlabcentral/answers/…
– Cris Luengo
Mar 7 at 21:41
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052758%2fis-there-a-way-to-trigger-a-breakpoint-with-a-variable-call-in-matlab%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052758%2fis-there-a-way-to-trigger-a-breakpoint-with-a-variable-call-in-matlab%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Variables are not called, they are read from or written to. You can search for uses of the variable name within your function, and set breakpoints on the lines found. If you are talking about global variables, you might want to stop using those exactly for this reason, it's hard to track where and when they're being modified.
– Cris Luengo
Mar 7 at 21:18
@CrisLuengo Thank you for the clarification. Unfortunately, I didn't create the code; it was passed down to me. Nevertheless, I will definitely be careful about my use of global variables. What is one way you recommend searching for the variables? Do you do this within Matlab? If not, where do you it? I ask because I tried to do this using the Windows search feature, but it didn't seem to work.
– Danny G.
Mar 7 at 21:23
Within a function, you just search with the editor. Actually the MATLAB Editor helps a lot by highlighting all occurrences of the variable name your cursor is on. With global variables it's harder, which is why they shouldn't be used. On Linux or MacOS you can use the command line utility
grep. I don't know a good solution on Windows, haven't used that in >10 years now.– Cris Luengo
Mar 7 at 21:29
1
Here are some ideas you could try: mathworks.com/matlabcentral/answers/…
– Cris Luengo
Mar 7 at 21:41