#+TITLE: Matlab Configuration :DRAWER: #+STARTUP: overview #+LANGUAGE: en #+EMAIL: dehaeze.thomas@gmail.com #+AUTHOR: Dehaeze Thomas #+HTML_LINK_HOME: ./index.html #+HTML_LINK_UP: ./index.html #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+PROPERTY: header-args:matlab :mkdir yes #+PROPERTY: header-args:matlab+ :exports code #+PROPERTY: header-args:matlab+ :eval no-export #+PROPERTY: header-args:matlab+ :results silent :END: * Startup :PROPERTIES: :HEADER-ARGS:matlab+: :tangle ~/Documents/MATLAB/startup.m :END: ** Setup LaTeX as a default interpreter #+begin_src matlab set(groot, 'DefaultTextInterpreter', 'LaTeX'); set(groot, 'DefaultAxesTickLabelInterpreter', 'LaTeX'); set(groot, 'DefaultAxesFontName', 'LaTeX'); set(groot, 'DefaultLegendInterpreter', 'LaTeX'); #+end_src ** Default Line Width #+begin_src matlab set(groot, 'DefaultLineLineWidth', 1.5); set(groot, 'DefaultAxesLineWidth', 0.5); #+end_src ** Default grids on all axis #+begin_src matlab set(groot, 'DefaultAxesXGrid','on'); set(groot, 'DefaultAxesYGrid','on'); set(groot, 'DefaultAxesZGrid','on'); #+end_src ** Default Font Size #+begin_src matlab set(groot, 'DefaultTextFontUnits', 'points'); set(groot, 'DefaultTextFontSize', 10); set(groot, 'DefaultAxesFontUnits', 'points'); set(groot, 'DefaultAxesFontSize', 10); set(groot, 'DefaultUicontrolFontSize', 10); #+end_src ** Default Fonts #+begin_src matlab set(groot, 'DefaultAxesFontName', 'Helvetica'); set(groot, 'DefaultTextFontName', 'Helvetica'); #+end_src ** Make figures into a Box #+begin_src matlab set(groot, 'DefaultAxesBox', 'on'); #+end_src ** Default Colors #+begin_src matlab set(groot, 'DefaultAxesColor', 'w'); set(groot, 'DefaultAxesXColor', 'k'); set(groot, 'DefaultAxesYColor', 'k'); set(groot, 'DefaultFigureColor', 'w'); #+end_src ** Default Plot Colors #+begin_src matlab 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]) #+end_src ** Figure paper and window style #+begin_src matlab set(groot, 'DefaultFigurePaperType', 'A4'); set(groot, 'DefaultFigureWindowStyle', 'normal'); #+end_src ** Set the display format #+begin_src matlab format compact; format long g; #+end_src ** Home Path #+begin_src matlab toolboxes_path = '~/Cloud/thesis/matlab/toolboxes/'; #+end_src ** Add to path #+begin_src matlab addpath([toolboxes_path 'Org-Mode-Toolbox/src']) addpath([toolboxes_path 'Usefull-Functions/src']) addpath([toolboxes_path 'Stacked-Elements-Toolbox/src']) addpath([toolboxes_path 'Measure-Analysis-Toolbox/src']) addpath([toolboxes_path 'Hinf-Toolbox/src']) addpath([toolboxes_path 'Fit-Model-Toolbox/src']) addpath([toolboxes_path 'Dspace-Toolbox/src']) addpath([toolboxes_path 'SpeedGoat-Toolbox/src']) addpath([toolboxes_path 'Add-Ons/matrix_fitting_toolbox_1']) addpath([toolboxes_path 'Add-Ons/matlab-schemer']) addpath([toolboxes_path 'Add-Ons/matlab2tikz/src']) addpath([toolboxes_path 'Add-Ons/hline_vline']) addpath([toolboxes_path 'Add-Ons/export_fig']) addpath([toolboxes_path 'Add-Ons/subaxis']) addpath([toolboxes_path 'Add-Ons/cbrewer']) addpath([toolboxes_path 'Add-Ons/tightfig']) addpath([toolboxes_path 'Add-Ons/fig2svg/src']) addpath([toolboxes_path 'Add-Ons/CVX']) addpath([toolboxes_path 'Add-Ons/MBeautifier']) #+end_src #+begin_src matlab addpath('/home/thomas/.emacs.d/.local/straight/repos/mirror/toolbox') #+end_src ** Clear #+begin_src matlab clear; #+end_src * Setup :PROPERTIES: :HEADER-ARGS:matlab+: :tangle ~/Documents/MATLAB/setup.m :END: ** Schemer Import #+begin_src matlab schemer_import([home_path '/Cloud/thesis/matlab/toolboxes/Add-Ons/matlab-schemer/schemes/monokai.prf']); #+end_src