表格里填字母matlab,[转载]用MATLAB作的希腊字母和数学符号表格

VIA:http://zjliu2001.blog.163.com/blog/static/422271542008965272197/

因为word输入特殊符号比较费劲,故考虑MATLAB做个表。请大家指正!

代码如下:

figure('Position',[1 31 1024 662]);

dh=0.05;

dv=0.125;

hold on;

% copyright Zhengjun Liu

axis([0,1,-0.25,1.0025],'off');

set(gca,'Position',[0.13 0.06 0.775 0.9])

for k=1:26;

plot([0,1],[1,1]*[1-(k-1)*dh],'k');

end

for k=1:2:8;

plot(k*dv*[1,1],[-0.25,1],'k');

end

plot([0,1],[1,1]*1,'k','linewidth',2);

plot([0,1],[1,1]*[-0.25],'k','linewidth',2);

set(gca,'Xtick',[],'YTick',[]);

r1=rectangle('Position',[2*dv,-0.25,0.003,1.25]);

r2=rectangle('Position',[4*dv,-0.25,0.003,1.25]);

r3=rectangle('Position',[6*dv,-0.25,0.003,1.25]);

set([r1,r2,r3],'FaceColor','w');

Ss={'alpha','beta','gamma','delta','epsilon','zeta','eta','theta',...

'vartheta','iota','kappa','lambda','mu','nu','xi','pi','rho',...

'sigma','varsigma','tau','equiv','Im','otimes','cap','supset',...

'int','rfloor','lfloor','perp','wedge','rceil','vee',...

'langle','upsilon','phi','chi','psi','omega','Gamma','Delta',...

'Theta','Lambda','Xi','Pi','Sigma','Upsilon','Phi','Psi','Omega',...

'forall','exists','ni','cong','approx','Re','oplus','cup',...

'subseteq','in','lceil','cdot','neg','times','surd','varpi',...

'rangle','sim','leq','infty','clubsuit','diamondsuit','heartsuit',...

'spadesuit','leftrightarrow','leftarrow','uparrow','rightarrow',...

'downarrow','circ','pm','geq','propto','partial','bullet','div',...

'neq','aleph','wp','oslash','supseteq','subset','o','nabla',...

'ldots','prime','{post.content}','mid','copyright'};

for k=1:length(Ss);

x=mod(k-1,4)+1;

y=fix([k-1]/4);

text([x*2-1.5]*dv,1-[y+0.5]*dh,['',char(Ss(k))],'HorizontalAlignment','center');

text([x*2-0.5]*dv,1-[y+0.5]*dh,['bf',char(Ss(k))],'HorizontalAlignment','center',...

'Fontsize',12,'Fontname','Times new roman');

end

输出效果如下:

a4c26d1e5885305701be709a3d33442f.png

因为word输入特殊符号比较费劲,故考虑MATLAB做个表。请大家指正!

代码如下:

figure('Position',[1 31 1024 662]);

dh=0.05;

dv=0.125;

hold on;

% copyright Zhengjun Liu

axis([0,1,-0.25,1.0025],'off');

set(gca,'Position',[0.13 0.06 0.775 0.9])

for k=1:26;

plot([0,1],[1,1]*[1-(k-1)*dh],'k');

end

for k=1:2:8;

plot(k*dv*[1,1],[-0.25,1],'k');

end

plot([0,1],[1,1]*1,'k','linewidth',2);

plot([0,1],[1,1]*[-0.25],'k','linewidth',2);

set(gca,'Xtick',[],'YTick',[]);

r1=rectangle('Position',[2*dv,-0.25,0.003,1.25]);

r2=rectangle('Position',[4*dv,-0.25,0.003,1.25]);

r3=rectangle('Position',[6*dv,-0.25,0.003,1.25]);

set([r1,r2,r3],'FaceColor','w');

Ss={'alpha','beta','gamma','delta','epsilon','zeta','eta','theta',...

'vartheta','iota','kappa','lambda','mu','nu','xi','pi','rho',...

'sigma','varsigma','tau','equiv','Im','otimes','cap','supset',...

'int','rfloor','lfloor','perp','wedge','rceil','vee',...

'langle','upsilon','phi','chi','psi','omega','Gamma','Delta',...

'Theta','Lambda','Xi','Pi','Sigma','Upsilon','Phi','Psi','Omega',...

'forall','exists','ni','cong','approx','Re','oplus','cup',...

'subseteq','in','lceil','cdot','neg','times','surd','varpi',...

'rangle','sim','leq','infty','clubsuit','diamondsuit','heartsuit',...

'spadesuit','leftrightarrow','leftarrow','uparrow','rightarrow',...

'downarrow','circ','pm','geq','propto','partial','bullet','div',...

'neq','aleph','wp','oslash','supseteq','subset','o','nabla',...

'ldots','prime','{post.content}','mid','copyright'};

for k=1:length(Ss);

x=mod(k-1,4)+1;

y=fix([k-1]/4);

text([x*2-1.5]*dv,1-[y+0.5]*dh,['',char(Ss(k))],'HorizontalAlignment','center');

text([x*2-0.5]*dv,1-[y+0.5]*dh,['bf',char(Ss(k))],'HorizontalAlignment','center',...

'Fontsize',12,'Fontname','Times new roman');

end

输出效果如下:

a4c26d1e5885305701be709a3d33442f.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值