From: Oscar on 18 Feb 2010 11:19 I have a matlab figure from which I am making an avi-file as it updates. First I used getframe which worked fine. However, this function requires that nothing is obstructing the figure on the screen (such as other programs). A way to solve this problem is to skip getframe and call addframe with the handle to the axes directly, i.e., addframe(aviobj,handle) This way, the figure does not even have to be visible for the movie to be made. Now comes the strange part. The size of the movie becomes much smaller when I skip getframe (approximately 40%) of the size of the figure. How can this happen, and how can I control the resolution of my avifile?
From: Oscar on 22 Feb 2010 09:59 I found the solution myself and I post it here if anyone else have the same problem. The problem was that when you do not use getframe, Matlab uses the hardcopy function that uses the Paperunit property of the figure. This was per default set to centimeter (probably since I live in Sweden) which apparently didn't match some other units that were in inches. So by putting the Paperunit to inches solved the problem. Still, it seems like a bug in Matlab that it doesn't check for this settings itself.
|
Pages: 1 Prev: replace values in a cell with nan Next: help needed in making blocks in an image... |