⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 latex2fprintf.m

📁 figures to latex code generate latex code for matlab figure
💻 M
字号:
function str_out = latex2fprintf(str_in)
% David Krause
% Queen's University
% June 30, 2006
% Convert a string that has single \ characters, i.e., '\mu / (2 \pi)'
% To double characters \  ->  \\, i.e., '\\mu / (2 \\pi)'
temp = findstr(str_in, '\');

str_out = [];
if ~isempty(temp)
    % For each \ found, add a \ just after
    for count = 1 : length(temp)
        if count == 1
            str_out = [str_out, str_in(1 : temp(1)), '\'];
        else
            str_out = [str_out, str_in((temp(count - 1) + 1) : temp(count)), '\'];
        end        
    end
    % Complete the string by adding the last characters
    str_out = [str_out, str_in((temp(end) + 1) : end)];   
else
    str_out = str_in;
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -