Hello, i have 15 m files which are script files and containing code at-least 500 lines each say file1.m,file2.m,file3.m,file4.m,file5.m,file6.m,file7.m,file8.m,file9.m,file10.m,file11.m,file12.m,file13.m,file14.m,file15.m and one Main.m file which are also script file and i want to access all files (all variables of these files) in Main.m and plot all variables in Main.m file,so that all the variables come to matlab work-space,i already try file1 via function method and .mat file method but not succeeded yet and Main.m gave error undefined variable, in main.m file i write save file1.mat and load file1.mat and also try it via function but still error can anyone tell me via code example how can i do it via .mat file method. I observed that main.m when run load only one m file variables and not all to workspace.

More Qazi Zafar Iqbal's questions See All
Similar questions and discussions