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 Question