# Octave-Pgfplot error: Could not read table [closed]

\documentclass[border= 5mm]{standalone}
\usepackage{filecontents,pgfplots}
\begin{filecontents}{data.txt}
x y z
2 1 5
3 2 6
2 4 7
4 4 4
5 5 5
6 7 8
9 10 11
\end{filecontents}

\begin{document}
\begin{tikzpicture}
\begin{axis}
tri=delaunay(data(:,1), data(:,2));
dlmwrite('triangles.txt',tri-1,' ');
disp(data)" | octave --silent};
\end{axis}
\end{tikzpicture}
\end{document}


I am trying to use octave with pgfplot to plot something similar to what is asked here (the above code is similar to that given in an answer there). The problem is that I am getting the error:

Package pgfplots Error: Could not read table file 'triangles.txt' in 'search the pgfplotstable manual for details). disp(data)" | octave --silent};

Note that I installed Octave on my PC (W7) and I added it to the PATH using the command (in cmd): set PATH%PATH%;C:\Octave\Octave-4.2.0\bin. Also note that I cannot find a file called 'triangles' in the folder where my tex file is.

Any idea what is the problem?

• Are you sure that Octave is added to the PATH? Because there was a similar question (tex.stackexchange.com/q/351556) where OP used the same cmd line command to add the program in question to the PATH, which obviously didn't work ... – Stefan Pinnow Mar 12 '17 at 20:34
• Your code works perfectly fine here, and generates triangles.txt, so I would guess it's a path issue. – Torbjørn T. Jun 21 '17 at 18:31