例如,我有以下代碼。如何將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