- Add this line to your
~/.bashrc
file
export PATH=$PATH:/usr/local/texlive/2015/bin/x86_64-linux
- Close and re-open your gnome-terminal
{ | |
// setup for 2017b, Ubuntu 16.04 | |
// change path for other Matlab versions | |
// quit call closes all figures and kills matlab process | |
"cmd": ["/usr/local/MATLAB/R2017b/bin/matlab", "-nodesktop", "-nosplash", "-r", "$file_base_name;quit"], | |
"selector": "source.m" | |
} |
#!/bin/bash | |
# this script will set up symbolio links. You can change variable to make it work for your system. | |
## VARIABLES ## | |
# define the path to the head of your tex-tree | |
texpath=/usr/share/texlive/texmf-dist/tex/latex | |
#texpath=<your-own-tex-path> | |
# define the class name |
fps=20 | |
scale=800 | |
nzero=4 | |
ffmpeg -r $fps -i %0"$nzero"d.png -c:v libx264 -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -pix_fmt yuv420p -y out.mp4 | |
ffmpeg -i out.mp4 -vf fps=$fps,scale=$scale:-1:flags=lanczos,palettegen -y palette.png | |
ffmpeg -i out.mp4 -i palette.png -filter_complex "fps=$fps,scale=$scale:-1:flags=lanczos[x];[x][1:v]paletteuse" -y output.gif |
The following code is written for Python3. Complete random name function in next file.
The first bit of code grabs a disctionary listing from the web and returns a list of all the entries in that dictionary.
(see https://stackoverflow.com/a/49524775/4038393)
import urllib.request
word_url = "http://svnweb.freebsd.org/csrg/share/dict/words?view=co&content-type=text/plain"
response = urllib.request.urlopen(word_url)
% function for normal flow depth following from Ganti et a., 2014 supplementary material | |
HnfunDW = (@(Q, B, Cf, S0, g) ((Q./B).^(2/3).*(Cf./(g.*S0)).^(1/3))); % generalized Darcy Weisbach, from Ganti et al., 2014 supp info |
# added by AM | |
# Show git branch name | |
# based largely on code from ankurk91: https://gist.github.com/ankurk91/2efe14650d54d7d09528cea3ed432f6d#file-bashrc-md | |
# and | |
# Dominik Schoeler: https://makandracards.com/makandra/1090-customize-your-bash-prompt | |
# | |
force_color_prompt=yes | |
color_prompt=yes | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' |
the path file pathdef.m might be read-only
In Matlab, enter:
>> which pathdef
/usr/local/MATLAB/R2018a/toolbox/local/pathdef.m
Enter a Linux terminal and change file permissions to read and write for anyone.
% load some example data | |
sampleDepth = [0.9500; 0.9500; 0.9500; 0.8500; 0.8500; 0.8500; 0.7500; 0.7500; 0.7500; 0.5000; 0.5000; 0.5000; 0.1000; 0.1000; 0.1000]; | |
sampleZ = [0.0850; 0.0850; 0.0850; 0.2550; 0.2550; 0.2550; 0.4250; 0.4250; 0.4250; 0.8500; 0.8500; 0.8500; 1.5300; 1.5300; 1.5300]; | |
conc = [1.5897; 1.8884; 2.3833; 1.0620; 0.8321; 0.8760; 0.4087; 0.5752; 0.4819; 0.4908; 0.6069; 0.5313; 0.2321; 0.2569; 0.2492]; | |
% organize into a model structure | |
modelParams.flowDepth = 1.7; | |
modelParams.b = 0.0850; |
get(0, 'factory') % lists all the options | |
set(0, 'defaultAxesBox', 'on') | |
set(0, 'defaultAxesXColor', [0 0 0]) | |
set(0, 'defaultAxesYColor', [0 0 0]) | |
set(0, 'defaultAxesLineWidth', 1.5) | |
set(0, 'defaultAxesFontSize', 10) |