Matlab

Matlab Code-Screenshot-Generator

Verwandle Matlab-Snippets in Bilder, die man gerne teilt — ohne deinen Mac zu verlassen.

MATLAB code is usually posted alongside a figure, which means the code image and the plot are read as a pair.

Codeshot erkennt Matlab an dem Code, den du einfügst; es gibt also keine Sprachauswahl, die man falsch treffen kann. Hier ist dasselbe Snippet in drei der 30 mitgelieferten Themes, gerendert mit den Stylesheets der App.

function img = exportSnapshot(code, theme, scale)
    arguments
        code   (1,:) char
        theme  (1,:) char = 'xcode'
        scale  (1,1) double = 2
    end

    img = render(code, theme);
    imwrite(imresize(img, scale), 'snapshot.png');
end
Edge · dunkel
function img = exportSnapshot(code, theme, scale)
    arguments
        code   (1,:) char
        theme  (1,:) char = 'xcode'
        scale  (1,1) double = 2
    end

    img = render(code, theme);
    imwrite(imresize(img, scale), 'snapshot.png');
end
GitHub · dunkel
function img = exportSnapshot(code, theme, scale)
    arguments
        code   (1,:) char
        theme  (1,:) char = 'xcode'
        scale  (1,1) double = 2
    end

    img = render(code, theme);
    imwrite(imresize(img, scale), 'snapshot.png');
end
Solarized · dunkel

Das passende Theme für Matlab

Match the width of the code image to the figure beside it. Two images of different widths in one post looks like an accident.

Die richtige Größe

Lass das Bild dem Inhalt folgen oder lege es auf ein Verhältnis fest — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 oder 3:4 — und exportiere dann mit 1×, 2× oder 3×, damit es auf Retina-Displays scharf bleibt. Kopiere es mit C direkt in die Zwischenablage oder sichere mit S.

Sieh dir alle 30 Themes im Vergleich an oder lies den kompletten Ablauf.

Gebaut für Matlab und 59 weitere Sprachen

Alles läuft auf deinem Mac. Dein Code verlässt ihn nie.

Für macOS laden