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
clear | |
%close all | |
% CHOOSE input parameters: | |
num_iter = 250; % number of iterations | |
lim = inf; % value at which we declare the sequence as "unbounded" | |
num_pix_real = 1080; % number of pixels in x | |
num_pix_imag = 1920; | |
%c_lims = [ -.8401 -.8391 .2224 ]; | |
%c_lims = [ -.84008 -.83895 .2224 ]; |
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
function Z = base2base(varargin) | |
% Three inputs: origin array, origin base, target base | |
% If a base is specified by a number, say b, the digits are [0,1,...,d-1]. | |
% The base can also be directly an array with the digits | |
% Fourth input, optional: how many digits the output should have as a | |
% minimum (padding with leading zeros, i.e with the first digit) | |
% Non-valid digits in origin array are discarded. | |
% It works with cell arrays. In this case it gives a matriz in which each | |
% row is padded with leading zeros if needed |
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
V!U % obtain an array of the digits of an integer number. It works by converting | |
% to string, then transposing, then converting to number. Transposition is | |
% needed so that conversion to number treats each digit separately | |
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
! 2$ | |
( 4$ | |
) 2# | |
Y) 2# | |
Z) 2# | |
Y' 4#, that is, FT# | |
Z' 1$ | |
X$ 2$ | |
X& 3$ | |
* N$ |