MATLAB: Hello. How to create such a matrix create matrixinfinite matrix 1 0 2 0 .. 0 2 0 3 .. 2 0 3 0 .. 0 3 0 4 .. 3 0 4 0 .. : : : : Best Answer Another way:c = [1 0 2 0 3];r = [3 0 4 0];h = hankel(c,r)You'll seeh = 1 0 2 0 0 2 0 3 2 0 3 0 0 3 0 4 3 0 4 0 Related SolutionsMATLAB: Add blank spaces in cell array ar = [0,1,0,0,0,0,0,0,0,0; ... 0,0,0,3,0,0,0,0,0,0; ... 0,0,0,0,0,0,2,0,0,0; ... 0,0,0,0,0,0,0,0,3,0; ... 4,0,0,0,0,0,0,0,0,0];fmt = repmat('%11d', 1, size(ar,2));% Either:C = sprintfc(fmt, ar); % Unfortunately not documented% Or:D = compose(fmt, ar) % Working since R2016b MATLAB: How to import .dat data fid=fopen('yourfile.dat','r');data=cell2mat(textscan(fid,'','CollectOutput',1,'CommentStyle','#'));fid=fclose(fid);looks like would do it. You'll end up w/ an array of double. Related Question3D matrix summationHello. I have doubt in importing image data
Best Answer