Same Name but Not Recognized Variable
Hello everyone, I am having issues when calling upon variables. I have a bunch of variables in this code and when I try to call them or hover over them it doesn’t highlight the others as the same.
I have included some pictures of my issue as I’m not quite sure how to describe it. The first one below shows me attempting to call a function, and the variables in calling that function are shown. However, when I call the function, I get this error: (in red of course)
The problem I’ve noticed is when I highlight a variable within calling that function, in the photo below I’ve highlighted "CurrThrottleData", it isn’t highlighted everywhere else. A few places, but not in the function definition below.
Same issue is shown below with "fileName"
My next thought was maybe the function name is having issues or it’s because I have the code separated into sections, but the function name lights up just fine in a different section. It previously worked when the function was called from a separate matlab file but it is really important that the function definitions and the code runs in one parent file for it all.
Any advice and help is appreciate, I have tried the following:
-Control f and replace everything with the same name but different capitalization to make sure it’d change it everywhere, this had no effect.
-Changing the name entirely to something different and manuall copy and pasting the name
-Copying the code in segments and running it in a new file
-Closing and opening matlab incase it needed a brain break… i guess hahaHello everyone, I am having issues when calling upon variables. I have a bunch of variables in this code and when I try to call them or hover over them it doesn’t highlight the others as the same.
I have included some pictures of my issue as I’m not quite sure how to describe it. The first one below shows me attempting to call a function, and the variables in calling that function are shown. However, when I call the function, I get this error: (in red of course)
The problem I’ve noticed is when I highlight a variable within calling that function, in the photo below I’ve highlighted "CurrThrottleData", it isn’t highlighted everywhere else. A few places, but not in the function definition below.
Same issue is shown below with "fileName"
My next thought was maybe the function name is having issues or it’s because I have the code separated into sections, but the function name lights up just fine in a different section. It previously worked when the function was called from a separate matlab file but it is really important that the function definitions and the code runs in one parent file for it all.
Any advice and help is appreciate, I have tried the following:
-Control f and replace everything with the same name but different capitalization to make sure it’d change it everywhere, this had no effect.
-Changing the name entirely to something different and manuall copy and pasting the name
-Copying the code in segments and running it in a new file
-Closing and opening matlab incase it needed a brain break… i guess haha Hello everyone, I am having issues when calling upon variables. I have a bunch of variables in this code and when I try to call them or hover over them it doesn’t highlight the others as the same.
I have included some pictures of my issue as I’m not quite sure how to describe it. The first one below shows me attempting to call a function, and the variables in calling that function are shown. However, when I call the function, I get this error: (in red of course)
The problem I’ve noticed is when I highlight a variable within calling that function, in the photo below I’ve highlighted "CurrThrottleData", it isn’t highlighted everywhere else. A few places, but not in the function definition below.
Same issue is shown below with "fileName"
My next thought was maybe the function name is having issues or it’s because I have the code separated into sections, but the function name lights up just fine in a different section. It previously worked when the function was called from a separate matlab file but it is really important that the function definitions and the code runs in one parent file for it all.
Any advice and help is appreciate, I have tried the following:
-Control f and replace everything with the same name but different capitalization to make sure it’d change it everywhere, this had no effect.
-Changing the name entirely to something different and manuall copy and pasting the name
-Copying the code in segments and running it in a new file
-Closing and opening matlab incase it needed a brain break… i guess haha codeprocessing, matlab, variable-errors, data, function, functions, matlab function, embedded matlab function MATLAB Answers — New Questions