亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? teximage_c.m

?? 內涵大量基于MATLAB的仿真算法
?? M
?? 第 1 頁 / 共 2 頁
字號:
  texbin = '';
end
[s,r] = run_system_cmd(['"' fullfile(texbin,['dvips' exe_ext]) ...
                    '" -D ' int2str(res) ' -E -o "' ps_file ...
                    '" "' dvi_file '"']);
if ~exist(ps_file)
  ind1 = findstr('!',r);
  if ~isempty(ind1)
    r = r(ind1:end);
  end
  error(['Error running DVIPS: ' r]);
end

function bits = ghostscript(file,res,exe_ext);
origpsfile = [file '.ps'];
psfile = [file '2.ps'];
%some postscript hacking to translate the equation to 0,0
origps_fid = fopen (origpsfile, 'r');
F=fread(origps_fid); % read the whole thing in
fclose(origps_fid);
F=char(F');
bbox=findstr('BoundingBox',F) + 13; % skip to start of numbers
bboxstr = F(bbox:bbox+50);
bbox = sscanf(bboxstr,'%d',4);      % read in bounding box
endsetup=findstr('EndSetup',F)+8;
while isspace(F(endsetup))
  endsetup = endsetup + 1;
end
F=[F(1:endsetup-1) int2str(-bbox(1)) ...
   ' ' int2str(-bbox(2)) ' translate ' F(endsetup:end)];
ps_fid = fopen (psfile, 'w');
fwrite(ps_fid,F);
fclose(ps_fid);

% now go and rasterize the translated file
pcx_file = [file '.pcx'];
rsp_file = [file '.rsp'];
rsp_fid = fopen (rsp_file, 'w');

ghostDir = fullfile( matlabroot, 'sys', 'ghostscript' );
if ~exist(ghostDir)
  error( ['Can not find the directory for Ghostscript in ' matlabroot] )
end

fprintf(rsp_fid, '-dNOPAUSE -q \n');
v = version;
if v(1) >= '6'
  fprintf(rsp_fid, '-I"%s"\n', fullfile( ghostDir, 'ps_files'));
  fprintf(rsp_fid, '-I"%s"\n', fullfile( ghostDir, 'fonts'));
  fprintf(rsp_fid, '-sOutputFile="%s"\n', pcx_file );
else
  fprintf(rsp_fid, '-I%s\n', fullfile( ghostDir, 'ps_files',' '));
  fprintf(rsp_fid, '-I%s\n', fullfile( ghostDir, 'fonts',' '));
  fprintf(rsp_fid, '-sOutputFile=%s\n', pcx_file );
end
fprintf(rsp_fid, '-sDEVICE=pcxmono\n');
width = ceil(bbox(3)-bbox(1))*res/72;
height = ceil(bbox(4)-bbox(2))*res/72;
fprintf( rsp_fid, ['-g' int2str(width) 'x' int2str(height) '\n'] );
fprintf( rsp_fid, ['-r' int2str(res) '\n'] );
fclose(rsp_fid);

if isunix
  gsPath = fullfile(ghostDir,'bin',getenv('ARCH'));
else
  gsPath = fullfile(ghostDir,'bin','win32');
  if ~exist(gsPath,'dir')
    gsPath = fullfile(ghostDir,'bin','nt');
  end
end  
[s, r] = run_system_cmd( ['echo quit | "' fullfile(gsPath, ['gs' exe_ext])...
                    '" "@' rsp_file '" "' psfile '"']);
if ~exist(pcx_file)
  error(['Error running Ghostscript: ' r]);
end
bits = double(imread(pcx_file,'pcx'));

function im = makeimage(p,color,antialias,csize,angle)
p = rot90(p,angle);
mask = p == 1;
F = repmat(1/(csize*csize),[csize csize]);
if isa(color,'char')
  switch lower(color)
   case 'y'
    color = [1 1 0];
   case 'm'
    color = [1 0 1];
   case 'c'
    color = [0 1 1];
   case 'r'
    color = [1 0 0];
   case 'g'
    color = [0 1 0];
   case 'b'
    color = [0 0 1];
   case 'w'
    color = [1 1 1];
   case 'k'
    color = [0 0 0];
   case 'none'
    color = [1 1 1];
  end
end
if (color(1) ~= color(2)) | (color(2) ~= color(3))
  p1 = p; p1(mask) = color(1);
  p2 = p; p2(mask) = color(2);
  p3 = p; p3(mask) = color(3);
  if isequal(antialias,'on')
    p1 = doblur(p1,F);
    p2 = doblur(p2,F);
    p3 = doblur(p3,F);
  end
  im = cat(3,p1,p2,p3);
else
  p(mask) = color(1);
  if isequal(antialias,'on')
    p = doblur(p,F);
  end
  im = repmat(p,[1 1 3]);
end

function out = doblur(p,F)
out = conv2(p,F,'valid'); % reduces p
out(out>1) = 1;out(out<0) = 0;

function menu = makecontextmenu(h)
menu = uicontextmenu;
item = uimenu('parent',menu,'label','Increase Size','callback',...
	       'teximage(''increasesize'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Decrease Size','callback',...
	       'teximage(''decreasesize'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Sharpen','callback',...
	       'teximage(''sharpentex'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Blur','callback',...
	       'teximage(''blurtex'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','AntiAlias','callback',...
	       'teximage(''togglealias'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Background');
sub = uimenu('parent',item,'label','White','callback',...
	       'teximage(''whitecolor'',gcbo)','userdata',h);
sub = uimenu('parent',item,'label','Figure Color','callback',...
	       'teximage(''figurecolor'',gcbo)','userdata',h);
sub = uimenu('parent',item,'label','Transparent','callback',...
	       'teximage(''transparent'',gcbo)','userdata',h);
item = uimenu('parent',menu,'label','Angle');
sub = uimenu('parent',item,'label','Rotate Counterclockwise','callback',...
	       'teximage(''rotcounterclock'',gcbo)','userdata',h);
sub = uimenu('parent',item,'label','Rotate Clockwise','callback',...
	       'teximage(''rotclockwise'',gcbo)','userdata',h);

function setantialiasmenu(h,antialias)
menu = get(h,'uicontextmenu');
ch = get(menu,'children');
set(ch(3),'checked',antialias);

function startmove(h)
ax=get(h,'parent');
fig=get(ax,'parent');
setappdata(fig,'teximagemotion',h);
setappdata(h,'mousemove',get(fig,'windowbuttonmotionfcn'));
setappdata(h,'mouseup',get(fig,'windowbuttonupfcn'));
fpos = convertUnits(get(fig,'units'),get(fig,'position'),'inches');
cp = convertUnits(get(fig,'units'),[get(fig,'currentpoint') 10 10],...
		  'inches',fpos,'inches');
setappdata(h,'currentpos',cp(1:2));
set(fig,'windowbuttonmotionfcn','teximage(''mousemove'',gcbo)');
set(fig,'windowbuttonupfcn','teximage(''endmove'',gcbo)');

function mousemove(fig)
h = getappdata(fig,'teximagemotion');
ax=get(h,'parent');
apos = get(ax,'position');
oldpos = getappdata(h,'currentpos');
funits = get(fig,'units');
fpos = convertUnits(funits,get(fig,'position'),'inches');
cp = convertUnits(funits,[get(fig,'currentpoint') 10 10],'inches',...
		  fpos,'inches');
newpos = cp(1:2);
diffs = newpos-oldpos;
apos(1:2) = apos(1:2) + diffs;
set(ax,'position',apos);
setappdata(h,'currentpos',newpos);
oldcenter = getappdata(h,'position');
cunits = getappdata(h,'units');
cp = convertUnits(cunits,[oldcenter 10 10],'inches',fpos,'inches');
cp(1:2) = cp(1:2) + diffs;
cp = convertUnits('inches',cp,cunits,fpos,'inches');
setappdata(h,'position',cp(1:2));

function endmove(fig)
h = getappdata(fig,'teximagemotion');
set(fig,'windowbuttonmotionfcn',getappdata(h,'mousemove'));
set(fig,'windowbuttonupfcn',getappdata(h,'mouseup'));

function docallback(s,menuh)
h = get(menuh,'userdata');
fig = get(get(h,'parent'),'parent');
op=get(fig,'pointer');
set(fig,'pointer','watch');
switch (s)
 case 'increasesize'
  teximage(h,'scale',getappdata(h,'scale') * 1.25);
 case 'decreasesize'
  teximage(h,'scale',getappdata(h,'scale') / 1.25);
 case 'sharpentex'
  teximage(h,'convolution',getappdata(h,'convolution') - 2);
 case 'blurtex'
  teximage(h,'convolution',getappdata(h,'convolution') + 2);
 case 'whitecolor'
  teximage(h,'background','w');
 case 'figurecolor'
  teximage(h,'background',get(fig,'color'));
 case 'transparent'
  teximage(h,'background','none');
 case 'togglealias'
  a = getappdata(h,'antialias');
  if isequal(a,'on')
    teximage(h,'antialias','off');
  else
    teximage(h,'antialias','on');
  end
 case 'rotcounterclock'
  teximage(h,'rotation',getappdata(h,'rotation') + 90);
 case 'rotclockwise'
  teximage(h,'rotation',getappdata(h,'rotation') - 90);
end
set(fig,'pointer',op);

function figuremoved(fig);
fpos = convertUnits(get(fig,'units'),get(fig,'position'),'inches');
H = findall(fig,'type','image','tag','teximage');
H=H(:)';
for h=H
  ax = get(h,'parent');
  hunits = getappdata(h,'units');
  if hunits(1) == 'n'
    apos = get(ax,'pos');
    pos = getappdata(h,'position');
    center = convertUnits(hunits,[pos 10 10],'inches',fpos,'inches');
    apos(1:2) = center(1:2) - .5*apos(3:4);
    set(ax,'pos',apos);
  end
end
  
function texbin = locateTeX
texbin = 0;
if isunix
  [s,path] = unix('which tex');
  if s == 0      % tex is on the system path so
    texbin = ''; % we don't need to include an explicit path
  end
else
  % first try looking for MiKTeX
  try
    texbin = winqueryreg('HKEY_LOCAL_MACHINE',...
	'SOFTWARE\MiK\MiKTeX\CurrentVersion\MiKTeX','Install Root');
  catch
    return
  end
  texbin = fullfile(texbin,'miktex','bin');
end

function texbin = promptForTeX(exe_ext)
oldcd = pwd;
cd(matlabroot); % so that the user doesn't start navigating
                % from the TEMP directory.
[file,texbin] = uigetfile(['*' exe_ext],'Locate TeX Executable');
cd(oldcd);

function val = getdefault(ishndl,s,str,default)
if ishndl
  val = getappdata(s,str);
elseif Lispref('teximage',str)
  val = Lgetpref('teximage',str);
else
  val = default;
end

function [s,r] = run_system_cmd(cmd);
if isunix
  [s, r] = unix(cmd);
else
  [s, r] = dos(cmd);
end

function val2 = convertUnits(units1,val1,units2,ref,refunits)
%Persistent figure so that we can get the figure position 
%  in inches instead of its units. This way we don't change 
%  the original figure. Also used to convert any units.
persistent teximage_figure_for_units;
persistent teximage_axes_for_units;
if isempty(teximage_figure_for_units)
  teximage_figure_for_units = figure('visible','off',...
				     'handlevis','off',...
				     'integerhandle','off');
  teximage_axes_for_units=axes('parent',teximage_figure_for_units);
end
set(teximage_figure_for_units,'units','inches');
if nargin == 3
  set(teximage_figure_for_units,'units',get(0,'Units'));
  set(teximage_figure_for_units,'position',get(0,'ScreenSize'));
else
  set(teximage_figure_for_units,'units',refunits);
  set(teximage_figure_for_units,'position',ref);
end
set(teximage_axes_for_units,'units',units1);
set(teximage_axes_for_units,'position',val1);
set(teximage_axes_for_units,'units',units2);
val2 = get(teximage_axes_for_units,'position');

function out = canreusebits(h,resolution,displaymode,s)
res  = getappdata(h,'resolution');
disp = getappdata(h,'displaymode');
str  = getappdata(h,'texstring');
out  = isequal(res,resolution) & isequal(disp,displaymode) & ...
      isequal(str,s);

% preferences API that works on both R11 and R12
function out = Lispref(s1,s2)
oldwarn = warning;
warning('off');
out = logical(0);
try
  out = ispref(s1,s2);
catch
  if isappdata(0,s1)
    h = getappdata(0,s1);
    out = isfield(h,s2);
  end
end
warning(oldwarn);

function out = Lgetpref(s1,s2)
oldwarn = warning;
warning('off');
try
  out = getpref(s1,s2);
catch
  if isappdata(0,s1)
    h = getappdata(0,s1);
    out = getfield(h,s2);
  else
    error(['No preference for ' s2]);
  end
end
warning(oldwarn);

function Lsetpref(s1,s2,val)
oldwarn = warning;
warning('off');
try
  setpref(s1,s2,val);
catch
  setappdata(0,'teximage',struct(s2,val));
  disp('Copy the following line into your startup.m:');
  if isa(val,'char')
    disp(['setappdata(0,''teximage'',struct(''' s2 ''', ''' val '''));']);
  end
end
warning(oldwarn);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
69堂成人精品免费视频| 久久久久9999亚洲精品| 久久久精品日韩欧美| 亚洲午夜精品17c| 亚洲精选在线视频| 秋霞午夜av一区二区三区| av激情综合网| 久久日韩粉嫩一区二区三区| 午夜天堂影视香蕉久久| 91一区一区三区| 欧美—级在线免费片| 激情偷乱视频一区二区三区| 欧美夫妻性生活| 日本亚洲最大的色成网站www| 欧美综合欧美视频| 一区二区三区蜜桃| 色综合婷婷久久| 亚洲乱码国产乱码精品精98午夜| 9久草视频在线视频精品| 日韩精品专区在线影院重磅| 亚洲成年人网站在线观看| 色av成人天堂桃色av| 一区二区三区欧美| 91看片淫黄大片一级在线观看| 国产精品久久久久久久第一福利| 成人黄色在线视频| 亚洲欧美日韩国产一区二区三区| 欧美视频你懂的| 日韩av电影一区| 国产欧美综合色| 欧美亚洲尤物久久| 久久电影国产免费久久电影 | 日本伊人色综合网| 欧美大片在线观看一区二区| 亚洲丝袜精品丝袜在线| 99精品一区二区| 欧美国产欧美综合| 暴力调教一区二区三区| 亚洲另类在线视频| 欧美精品第一页| 狠狠色丁香九九婷婷综合五月| 亚洲精品一区二区三区蜜桃下载 | 一区二区三区不卡视频在线观看| 91久久久免费一区二区| 日本不卡高清视频| 欧美激情一区二区| 一本色道久久综合精品竹菊| 亚洲精品美国一| 91精品国产高清一区二区三区 | 欧美日韩专区在线| 奇米一区二区三区av| 国产亲近乱来精品视频 | 91精品国产免费| 国产精品亚洲专一区二区三区| 国产肉丝袜一区二区| 欧美曰成人黄网| 精品亚洲porn| 亚洲精品日韩综合观看成人91| 日韩一区二区三区在线| 成人动漫视频在线| 日韩电影在线观看一区| 亚洲国产精品二十页| 日韩午夜激情视频| 91国模大尺度私拍在线视频 | 国产福利一区二区三区视频| 亚洲国产日日夜夜| 中文字幕在线不卡一区| 欧美日韩亚洲综合在线| 成人精品免费网站| 久久国产视频网| 亚洲美女屁股眼交| 国产精品毛片无遮挡高清| 欧美大胆人体bbbb| 欧洲日韩一区二区三区| 99热99精品| 北条麻妃国产九九精品视频| 天堂蜜桃一区二区三区 | 成人免费视频播放| 国产精品久久影院| 99国产精品国产精品毛片| 不卡一区二区在线| 国产精品久久久久毛片软件| 欧美精品久久一区二区三区| 欧美综合天天夜夜久久| 色综合久久久久久久久| 99久久久免费精品国产一区二区| 国内成+人亚洲+欧美+综合在线| 亚洲三级在线免费| 一区二区三区在线观看国产| 亚洲欧美中日韩| 日本一区二区三区四区| 国产精品网曝门| 国产精品久久久爽爽爽麻豆色哟哟| 国产日产精品一区| 亚洲人成网站影音先锋播放| 亚洲综合另类小说| 亚洲影院免费观看| 日韩激情在线观看| 国产精品伊人色| 国产在线播放一区| 北条麻妃国产九九精品视频| 日本久久电影网| 欧美视频精品在线观看| 欧美不卡一区二区| 日韩限制级电影在线观看| 久久综合九色欧美综合狠狠| 国产欧美一区二区三区沐欲| 悠悠色在线精品| 老司机免费视频一区二区| 国产一区二区三区香蕉| 91偷拍与自偷拍精品| 欧美精品丝袜久久久中文字幕| 欧美videos中文字幕| 国产日韩欧美精品综合| 亚洲mv在线观看| 成人h精品动漫一区二区三区| 99久久国产综合色|国产精品| 91麻豆精品国产91久久久 | 午夜精品久久久| 欧美日韩电影在线| 欧美日韩国产在线观看| 欧美剧在线免费观看网站 | 亚洲最新视频在线播放| 亚洲午夜国产一区99re久久| 国产一区亚洲一区| 欧美午夜片在线观看| 国产精品久久久久7777按摩| 免费观看成人av| 日本久久电影网| 中文字幕一区二区三区在线观看| 国内精品嫩模私拍在线| 一本色道综合亚洲| 在线播放欧美女士性生活| 国产精品久久看| 国产成人小视频| 精品国产一区二区亚洲人成毛片| 亚洲丶国产丶欧美一区二区三区| caoporn国产精品| 国产精品免费网站在线观看| 精品一二三四区| 欧美精品1区2区3区| 亚洲一区精品在线| 不卡影院免费观看| 国产精品嫩草影院com| 国产成人免费在线观看不卡| 精品国产一二三| 国内国产精品久久| 久久久久久久久久久久电影| 亚洲精品乱码久久久久| 成人小视频在线| 亚洲欧美经典视频| 欧美三级一区二区| 亚洲理论在线观看| 91视频免费播放| 一区二区三区国产| 欧美va天堂va视频va在线| 国产精品自产自拍| 亚洲人成精品久久久久久| 欧美精品少妇一区二区三区| 久久成人免费网| 亚洲精品国产a| 欧美久久久久久久久| 国产成人亚洲综合色影视| 国产精品久久久99| 欧美日韩不卡视频| 国产成人免费在线观看| 亚洲一区二区三区中文字幕| 精品国产一区久久| 99久久99久久免费精品蜜臀| 黑人巨大精品欧美黑白配亚洲| 久久精品欧美日韩精品| 成人午夜视频网站| 亚洲免费伊人电影| 成人动漫一区二区| 亚洲国产成人porn| 欧美精品日韩综合在线| 久草精品在线观看| 国产欧美一区二区精品仙草咪| 7878成人国产在线观看| 成人精品国产一区二区4080| 捆绑调教一区二区三区| 亚洲成人免费观看| 亚洲精品菠萝久久久久久久| 亚洲色图欧美在线| 亚洲特级片在线| 中文字幕一区二区三区蜜月| 精品国产乱码久久久久久免费| 欧美日韩国产免费一区二区| 日本韩国精品在线| 91国内精品野花午夜精品| 91美女在线看| 在线精品视频一区二区| 在线亚洲人成电影网站色www| www.亚洲在线| 91日韩一区二区三区| 欧美最猛性xxxxx直播| 欧美亚洲一区二区三区四区| 欧美三日本三级三级在线播放| 欧美性大战久久久久久久蜜臀| 欧美三级日韩三级国产三级|