MATLAB: How to declare a string variable which I can call when loading a filename

filenameloadstring variable

I want to plot files amongst which the only thing that changes is a word. Therefore, I want to declare a variable which I can call in the filename. Model=(CanESM); load('Model.mean.dat'); …

Best Answer

model='Model.mean.dat'
load(model);
Related Question