The solution is simple: use a function instead of a script (although it is possible to write a script that will use this value).
A script shares the workspace with the calling environment, while a function uses input and output arguments. That makes functions a documentable interface that can be updated without worrying that code using the function will break.
You should not use a script for things you plan to use after next week.
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). There is a chapter on functions.