📄 testweb3.m
字号:
function retstr = testweb3(in)
% 初始化返回字符串
retstr = char('');
% 设置工作目录,保存图片用
cd(in.mldir);
% 读取html文件中表单数据
x = str2double(in.x);
y = str2double(in.y);
z = x * sin((y+[1:256])*2*pi/256);
f = figure('visible','off');
plot(z)
% Adjust size
pos = get(gcf, 'position');
pos(3) = 380;
pos(4) = 310;
set(gcf, 'Position', pos, 'PaperPosition', [.25 .25 4 3]);
drawnow;
pic = sprintf('%spic.jpeg', in.mlid);
wsprintjpeg(f, pic);
close(f);
% 设置输出变量,共输出html文件用
out.pic = pic;
% 调用HTMLREP,生成html输出文件
tmpfile = which('testtmp3.html');
retstr = htmlrep(out, tmpfile);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -