This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.backends.backend_pdf import PdfPages | |
x = np.random.randn(1000) | |
fig = plt.figure() | |
ax = fig.add_subplot(1,1,1) | |
ax.hist(x, 100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "udf.h" | |
#define MAXPOINTS 5000 | |
#define NSCALARS (1+ND_ND) | |
float coords[MAXPOINTS][ND_ND+1]; | |
float values[MAXPOINTS][NSCALARS+ND_ND]; | |
int total_count; | |
int total_points_found = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pylab as plt | |
def phi(x): | |
y = np.zeros((len(x), )) | |
index = np.absolute(x) < 1 | |
y[index] = np.exp(1/(x[index]**2-1)) | |
return y | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[border=10pt]{standalone} | |
\usepackage{tikz} | |
% Vector Styles | |
\tikzstyle{load}=[ultra thick,-latex] | |
\tikzstyle{stress}=[-latex] | |
\tikzstyle{dim}=[latex-latex] | |
\tikzstyle{axis}=[-latex,black!55] | |
% Drawing Views |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x_0 f(x) | |
$flags auto[subscript]:8 auto[subscript]:8 | |
3.16693000e-05 -4.00001451e+00 | |
1.00816962e-03 -3.08781504e+00 | |
1.98466995e-03 -2.88058811e+00 | |
2.96117027e-03 -2.75205040e+00 | |
3.93767059e-03 -2.65736805e+00 | |
4.91417091e-03 -2.58181091e+00 | |
5.89067124e-03 -2.51862689e+00 | |
6.86717156e-03 -2.46413745e+00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper]{article} | |
% for dvipdfm: | |
%\def\pgfsysdriver{pgfsys-dvipdfm.def} | |
\usepackage{pgfplots} | |
\pgfplotsset{compat=1.8}% <-- moves axis labels near ticklabels (respects tick label widths) | |
\begin{document} | |
\begin{figure} | |
\centering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def coth(x): | |
return np.cosh(x)/np.sinh(x) | |
def brilloutin(J, x): | |
if x == 0: | |
return 0 | |
else: | |
return (2*J+1)/(2*J)*coth((2*J+1)/(2*J)*x) - 1/(2*J)*coth(1/(2*J)*x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Brillouin Function | |
% Author: Mark Wibrow | |
\documentclass[tikz,border=10pt]{standalone} | |
\usepackage{amsmath} | |
\usetikzlibrary{arrows.meta} | |
\directlua{ | |
function coth (i) | |
return math.cosh(i) / math.sinh(i) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tikz} | |
\begin{document} | |
\begin{tikzpicture}[scale=2] | |
\draw[gray,very thin] (-1.9,-1.9) grid (2.9,3.9) | |
[step=0.25cm] (-1,-1) grid (1,1); | |
\draw[blue] (1,-2.1) -- (1,4.1); % asymptote | |
\draw[->] (-2,0) -- (3,0) node[right] {$x(t)$}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tikz} | |
\usetikzlibrary{datavisualization} | |
\usetikzlibrary{datavisualization.formats.functions} | |
\begin{document} | |
\begin{tikzpicture} | |
\datavisualization [scientific axes=clean] | |
[ |
NewerOlder