Hi all,
This will probably be a very straightforward question but I can't get to the bottom of it. I just started reading Mike Cohen's book 'MATLAB for Brain and Cognitive Scientists' this afternoon. He suggests checking the difference between 'clear a' and clear a*' in one of the preliminary chapters. They don't appear to do anything different. I have read the MATLAB documentation for 'clear' again (not to much to chew on), and I can't see anything.
Given what little I know about pointers from C++, I initially imagined that clear a* would remove the value stored in a from the workspace, but that the memory allocated to it would remain (just empty); and that clear a would remove variable a from the workspace entirely. I then checked both with 'whos' and both commands simply remove the variable and its value.
I downloaded a set of tip scripts from Mike's website for the book. The tip for that part of the chapter is simply:
%% 6
clear aclear a*
In a last-ditch effort, I Googled it in a few different ways, but turned up nothing.
There are a thousand more interesting issues and questions I could ask, but this is just driving me up the wall because I can't find the answer, even though I know it will be simple. Does anybody know what exactly he is trying to get at with this?
Cheers!
Rowan.
Best Answer