#+begin_src matlab :tangle no :results none :exports none :var current_dir=""
%% Go to current Directory
cd(current_dir);
%% Initialize ans with org-babel
ans = 0;
#+end_src
** =matlab-init= Initialize matlab
#+name: matlab-init
#+begin_src matlab :results none :exports none
%% Clear Workspace and Close figures
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
#+end_src
** =plt-matlab= Plot figures
Some variable can be set by block that expands this org source code block:
- =path=: specify the path of the figure including the file extension. Can be relative or absolute. If not provided, it will create the figure in the =/tmp= folder
- =fig_size=: can specify the size of the figure. If not specify, default will be applied.
#+name: plt-matlab
#+begin_src matlab :results value raw replace :exports code :var filepath="" :var figsize="normal-normal"