-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtparams.m
More file actions
40 lines (33 loc) · 858 Bytes
/
tparams.m
File metadata and controls
40 lines (33 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% TPARAMS Get/set parameters for terminal plotting functions
%
% Usage
% old_params = tparams(new_params);
%
% Input
% new_params: A struct containing new parameters. If empty, leaves the
% parameters as is (default empty).
%
% Output
% old_params: The old set of terminal plotting parameters.
%
% Note
% This function is used internally to control the terminal plotting
% parameters. It should not be used directly by the end user.
function old_params = tparams(new_params)
persistent params;
if nargin < 1
new_params = [];
end
if isempty(params)
params = default_tparams();
end
old_params = params;
if ~isempty(new_params)
params = new_params;
end
end
function params = default_tparams()
params = struct();
params.winsize = [22 78];
params.rendermode = 1;
end