Uwe,

In my testing (using octave since = I don't have matlab, but I hope it's similar), using =3D=C2=A0:expo= rts none :results output raw=3D seems to produce the desired output:
<= div>
#+begin_src octave :exports results :results output raw<= br>close all
N =3D 3; % number of chebyshev nodes
n =3D 1; % polytrop= ic index
iters =3D 1; % iterations
j=3D[0 1 2 3];
z=3Dcos((pi*j)/3= );
y=3D1-(0.5*(z+1)).^2;
a=3Dn*(8);
a2=3Deye(3+1)*a;
disp('= \begin{align*}')
disp('A_{1,k-1}&=3D')
disp('\beg= in{pmatrix}')
fprintf('%g &%g &%g &%g\\\\\n',a2&= #39;)
disp('\end{pmatrix}=3DOK\\')
disp('\end{align*}'= ;)
#+end_src

#+RESULTS:
\begin{align*}
A_{1,k-1}&=3D\begin{pmatrix}
8 &0 &0 &0\\
0 &8 &0 &0\\0 &0 &8 &0\\
0 &0 &0 &8\\
\end{pmatrix}=3DOK= \\
\end{align*}

Which renders the matrix co= rrectly. I first tried with =3D:exports results=3D, but that for some reaso= n results in the results being included twice in the LaTeX output. I'm = not sure why.

Hope this helps,
--Diego

On Tue, Oct 13, 2020 at 1:36 PM Uwe Brauer <oub@mat.ucm.es> wrote:
>>> "AB" =3D=3D= Arne Babenhauserheide <arne_bab@web.de> writes:

> Uwe Brauer <oub= @mat.ucm.es> writes:

>> That did not work: I tried
>> #+begin_src matlab=C2=A0 :results output
>>
>> But when I exported the org file to latex, the matlab code was als= o
>> exported. Strange

> Do you use :exports results?

> :results output switches to show what is printed to stdout

It does not do want I want
#+begin_src matlab :exports results
close all
N =3D 3; % number of chebyshev nodes
n =3D 1; % polytropic index
iters =3D 1; % iterations
j=3D[0 1 2 3];
z=3Dcos((pi*j)/3);
y=3D1-(0.5*(z+1)).^2;
a=3Dn*(8);
a2=3Deye(3+1)*a;
disp('\begin{align*}')
disp('A_{1,k-1}&=3D')
disp('\begin{pmatrix}')
fprintf('%g &%g &%g &%g\\\\\n',a2')
disp('\end{pmatrix}=3DOK\\')
disp('\end{align*}')
#+end_src

\begin{verbatim}
\begin{align*}
A_{1,k-1}&=3D
\begin{pmatrix}
8 &0 &0 &0\\
0 &8 &0 &0\\
0 &0 &8 &0\\
0 &0 &0 &8\\
\end{pmatrix}=3DOK\\
\end{align*}
\end{verbatim}

So at the moment the only solution I can think of is to use the code I
posted

(defun my-latex-filter-src-blocks (text backend info)
=C2=A0 "Remove source blocks from latex export."
=C2=A0 (when (org-export-derived-backend-p backend 'latex)
=C2=A0 =C2=A0 "%% [removed source block]\n"))