MATLAB: Reduce the size of figure,

reduce the size of figure

Hello Everyone, How can I reduce the size of figure in Matlab? Thanks

Best Answer

Then you are looking for some clever matrix work, rather than figure size.
Try smth like this:
wavelength = 100;
a = 1:4001;
A = repmat(a, [3001 1]);
B = 3.*(sin((1-A).*2.*pi./wavelength)) + 1003;
figure;
imagesc(B);
Takes less than a second to run on my computer and does around the same. You might have to fix the last couple of details for it to be an exact match.
Related Question