UP | HOME

Matlab Configuration

Table of Contents

Startup

Setup LaTeX as a default interpreter

set(groot, 'DefaultTextInterpreter', 'LaTeX');
set(groot, 'DefaultAxesTickLabelInterpreter', 'LaTeX');
set(groot, 'DefaultAxesFontName', 'LaTeX');
set(groot, 'DefaultLegendInterpreter', 'LaTeX');

Default Line Width

set(groot, 'DefaultLineLineWidth', 1.5);
set(groot, 'DefaultAxesLineWidth', 0.5);

Default grids on all axis

set(groot, 'DefaultAxesXGrid','on');
set(groot, 'DefaultAxesYGrid','on');
set(groot, 'DefaultAxesZGrid','on');

Default Font Size

set(groot, 'DefaultTextFontUnits', 'points');
set(groot, 'DefaultTextFontSize', 10);
set(groot, 'DefaultAxesFontUnits', 'points');
set(groot, 'DefaultAxesFontSize', 10);
set(groot, 'DefaultUicontrolFontSize', 10);

Default Fonts

set(groot, 'DefaultAxesFontName', 'Helvetica');
set(groot, 'DefaultTextFontName', 'Helvetica');

Make figures into a Box

set(groot, 'DefaultAxesBox', 'on');

Default Colors

set(groot, 'DefaultAxesColor', 'w');
set(groot, 'DefaultAxesXColor', 'k');
set(groot, 'DefaultAxesYColor', 'k');

set(groot, 'DefaultFigureColor', 'w');

Default Plot Colors

c1 = [     0    0.4470    0.7410]; % Blue
c2 = [0.8500    0.3250    0.0980]; % Orange
c3 = [0.9290    0.6940    0.1250]; % Yellow
c4 = [0.4940    0.1840    0.5560]; % Purple
c5 = [0.4660    0.6740    0.1880]; % Green
c6 = [0.3010    0.7450    0.9330]; % Light Blue
c7 = [0.6350    0.0780    0.1840]; % Red

set(groot, 'defaultAxesColorOrder', [c1; c2; c3; c4; c5; c6; c7])

Figure paper and window style

set(groot, 'DefaultFigurePaperType', 'A4');
set(groot, 'DefaultFigureWindowStyle', 'normal');

Set the display format

format compact;
format long g;

Home Path

toolboxes_path = '~/Cloud/thesis/matlab/toolboxes/';

Add to path

Provides vecfig3 for FRF fitting (link).

addpath([toolboxes_path 'matrix_fitting_toolbox_1'])

Apply and save color schemes in MATLAB with ease (link).

addpath([toolboxes_path 'matlab-schemer'])

Converts MATLAB figures to TikZ (link).

addpath([toolboxes_path 'matlab2tikz/src'])

Working with Tensors (link).

addpath([toolboxes_path 'tensorlab'])

MATLAB toolbox for exporting publication quality figures (link).

addpath([toolboxes_path 'export_fig'])

MATLAB source code formatter, beautifier (link).

addpath([toolboxes_path 'MBeautifier'])

Toolbox for Convex Programming (link).

addpath([toolboxes_path 'CVX'])

Useful functions to use with orgmode (link).

addpath([toolboxes_path 'Org-Mode-Toolbox/src'])

Some useful function (link).

addpath([toolboxes_path 'matlab_useful_functions/src'])

H-Infinity Toolbox (link).

% addpath([toolboxes_path 'Hinf-Toolbox/src'])

Toolbox to work with Finite Element Models (link).

addpath([toolboxes_path 'fem_toolbox/src'])

Toolbox to work with fractional order models (link).

addpath(genpath([toolboxes_path 'fomcon-matlab']))

Clear

clear;

Setup

This script should be run once after Matlab is installed.

Import a nice color scheme.

schemer_import('~/Cloud/thesis/matlab/toolboxes/Add-Ons/matlab-schemer/schemes/monokai.prf');

Author: Dehaeze Thomas

Created: 2021-10-25 lun. 14:33