例如,我有以下代码。如何将matlab代码转换为图像?
% Generate random data from a uniform distribution
% and calculate the mean. Plot the data and the mean.
n = 50; % 50 data points
r = rand(n,1);
plot(r)
% Draw a line from (0,m) to (n,m)
m = mean(r);
hold on
plot([0,n],[m,m])
hold off
title('Mean of Random Uniform Data')
for v = 1.0:-0.2:0.0
disp(v)
end
我想将MATLAB代码转换为图像。
例如,如果你的MATLAB代码复制到一个软件,然后将它返回这样的形象:
怎么办呢?
如果我使用此代码并将其发布到PDF文件,代码不会完全显示。
sumLumi(x,y)=LLmap3(floor(x/4)+1,floor(y/4)+1)+LLmap3(floor(x/4)+2,floor(y/4)+1)+LLmap3(floor(x/4)+1,floor(y/4)+2)+LLmap3(floor(x/4)+2,floor(y/4)+2);
你可以断行,并通过使用'继续在MATLAB ...',看到我的编辑 – Steve