MATLAB: Creating .mat files with variables mat files hello all how can i create as .mat file with 4 variables in it of diff sizes like a=1×1 mtx,b=100x128mtx,c=116×128 mtx and d=1×128 mtx. Best Answer a=10;b=rand(100,128);c=rand(116,128);d=rand(1,128);save('myfile.mat','a','b','c','d'); Related SolutionsMATLAB: Load variable from mat file S = load('YourFileName', 'Y');Y = S.Y; MATLAB: Merging 2 mat files clcclearx1 = load('mat_file_1.mat');x2 = load('mat_file_2.mat');a = [x1.a;x2.a];b = [x1.b;x2.b];c = [x1.c;x2.c];d = [x1.d;x2.d]; Related QuestionMAT filesStoring Outputs from a Nested Loop with a step
Best Answer