I have a global variable. I run the code for several times. I put 'clear;clc' at the front. Strangely before the global variable is called, it already has a value. However I rerun it, it always has a value before its line is called. What could've happened?
MATLAB: Global variables not cleared after ‘clear;clc’
global variable
Related Question
- Does “clear” command clears the global variables
- How to stop matlab automatically converting a normal variable into a global variable that I defined previously but deleted.
- Clear, clear all and tic toc time
- How to use global variables and MATLAB workspaces
- Simple clear script
- Stuck with function giving a zero output when calling global variables
Best Answer