Created
December 21, 2014 22:25
-
-
Save dhermes/d683de36f4f0deacf937 to your computer and use it in GitHub Desktop.
Message for Process - Oct2Py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
close all; | |
set(0, 'DefaultFigurePosition', [300, 200, 500, 500]); | |
__oct2py_figures = []; | |
close all; | |
__oct2py_figure_visible = 'off'; | |
clear("ans"); | |
clear("_"); | |
clear("a__"); | |
disp(char(2)) | |
try | |
disp(char(2)); | |
# butterworth filter, order 2, cutoff pi/2 radians | |
b = [0.292893218813452 0.585786437626905 0.292893218813452]; | |
a = [1 0 0.171572875253810]; | |
freqz(b, a, 32); | |
if exist("ans") == 1 | |
_ = ans; | |
end | |
disp(char(3)) | |
catch | |
disp(lasterr()); | |
disp(char(24)); | |
end | |
if exist("_") == 1 | |
if exist("a__") == 0 | |
save -v6 /tmp/tmpSR_B5s.mat _; | |
end | |
end | |
for f = __oct2py_figures | |
outfile = sprintf('/tmp/tmpeuMb68/__ipy_oct_fig_%03d.png', f + 0); | |
p = get(f, 'position'); | |
w = 500; | |
h = 500; | |
if p(3) > 500 | |
h = p(4) * w / p(3); | |
end | |
if p(4) > 500 | |
w = p(3) * h / p(4); | |
end | |
size_fmt = sprintf('-S%d,%d', w, h); | |
try | |
print(f, outfile, '-dpng', '-tight', size_fmt); | |
end | |
end | |
close('all'); | |
disp(char(3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment