Matlab

Gerador de imagens de código Matlab

Transforme trechos de Matlab em imagens que valem a pena compartilhar, sem sair do seu Mac.

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

O Codeshot detecta Matlab pelo código que você cola, então não há seletor de linguagem para errar. Aqui está o mesmo trecho em três dos 30 temas inclusos, renderizados com as folhas de estilo do próprio 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 · escuro
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 · escuro
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 · escuro

Escolhendo um tema para 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.

Acertando o tamanho

Deixe a imagem seguir o conteúdo ou fixe uma proporção — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 ou 3:4 — e exporte em 1×, 2× ou 3× para que continue nítida em telas retina. Copie direto para a área de transferência com C ou salve com S.

Veja os 30 temas lado a lado ou leia o fluxo completo.

Feito para Matlab e outras 59 linguagens

Tudo roda no seu Mac. Seu código nunca sai dele.

Baixar para macOS