Matlab

Generador de imágenes de código Matlab

Convierte fragmentos de Matlab en imágenes que merece la pena compartir, sin salir de tu Mac.

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

Codeshot detecta Matlab a partir del código que pegas, así que no hay selector de lenguaje que puedas equivocar. Aquí tienes el mismo fragmento en tres de los 30 temas incluidos, renderizados con las hojas de estilo de la propia 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 · oscuro
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 · oscuro
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 · oscuro

Elegir un 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.

Acertar con el tamaño

Deja que la imagen siga a tu contenido o fíjala a una proporción — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 o 3:4 — y exporta a 1×, 2× o 3× para que se mantenga nítida en pantallas retina. Cópiala al portapapeles con C o guárdala con S.

Mira los 30 temas comparados o lee el flujo completo.

Hecho para Matlab y otros 59 lenguajes

Todo se ejecuta en tu Mac. Tu código nunca sale de ahí.

Descargar para macOS