Can anyone help me to write a MATLAB script like the one attached?

2 visualizaciones (últimos 30 días)
Energy-level-diagram-depicting-the-band-gaps-of-AS2-and-AS1-in-comparison-with-P3HT.png

Respuesta aceptada

Meg Noah
Meg Noah el 8 de En. de 2020
Editada: Meg Noah el 8 de En. de 2020
Yes. It's not exact, and the arrow is kludged but I hope it is good enough:
clc
clear all
close all
fig = figure('color','white','position',[40 300 700 475]);
hold on;
xlim([0 6]);
ylim([-6.5 -2.5]);
set(gca,'ydir','normal');
set(gca,'ytick',-6.5:0.5:-2.5);
ylabelString = get(gca,'yticklabel');
ylabelString{1} = 'HOMO';
ylabelString{end} = 'LUMO';
plot(0.02,-2.5,'^','markersize',10,'markerfacecolor','k','markeredgecolor','k');
set(gca,'linewidth',3);
set(gca,'yticklabel',ylabelString);
ylabel('Energy gap (eV)');
set(gca,'xtick',[]);
set(gca,'xcolor',[1 1 1]);
set(gca,'fontweight','bold');
set(gca,'fontsize',12);
% each energy transition
itransition = 0;
energy = -4.7;
plot([itransition+0.5 itransition+1],[energy energy],'k','Linewidth',5);
text(itransition+0.75,energy+0.25,num2str(energy,'%.2f'), ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
text(itransition+0.75,energy-0.25,'ITO', ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
itransition = 1;
energy1 = -5.2;
plot([itransition+0.5 itransition+1],[energy1 energy1],'k','Linewidth',5);
text(itransition+0.75,energy1-0.25,num2str(energy1,'%.2f'), ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
text(itransition+0.75,energy1-0.5,'P3HT', ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
energy2 = -3.2;
plot([itransition+0.5 itransition+1],[energy2 energy2],'k','Linewidth',5);
text(itransition+0.75,energy2+0.25,num2str(energy2,'%.2f'), ...
'horizontalalignment','center', ...
'fontsize',12,'fontweight','bold');
h = text(itransition+0.75,(energy1+energy2)/2,'E_g=2.00', ...
'horizontalalignment','center', ...
'fontsize',12,'fontweight','bold');
set(h,'Rotation',90);
itransition = 2;
energy1 = -5.56;
plot([itransition+0.5 itransition+1],[energy1 energy1],'k','Linewidth',5);
text(itransition+0.75,energy1-0.25,num2str(energy1,'%.2f'), ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
text(itransition+0.75,energy1-0.5,'AS1', ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
energy2 = -3.39;
plot([itransition+0.5 itransition+1],[energy2 energy2],'k','Linewidth',5);
text(itransition+0.75,energy2+0.25,num2str(energy2,'%.2f'), ...
'horizontalalignment','center', ...
'fontsize',12,'fontweight','bold');
h = text(itransition+0.75,(energy1+energy2)/2,'E_g=2.17', ...
'horizontalalignment','center', ...
'fontsize',12,'fontweight','bold');
set(h,'Rotation',90);
itransition = 3;
energy1 = -5.38;
plot([itransition+0.5 itransition+1],[energy1 energy1],'k','Linewidth',5);
text(itransition+0.75,energy1-0.25,num2str(energy1,'%.2f'), ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
text(itransition+0.75,energy1-0.5,'AS2', ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
energy2 = -3.45;
plot([itransition+0.5 itransition+1],[energy2 energy2],'k','Linewidth',5);
text(itransition+0.75,energy2+0.25,num2str(energy2,'%.2f'), ...
'horizontalalignment','center', ...
'fontsize',12,'fontweight','bold');
h = text(itransition+0.75,(energy1+energy2)/2,'E_g=1.93', ...
'horizontalalignment','center', ...
'fontsize',12,'fontweight','bold');
set(h,'Rotation',90);
itransition = 4;
energy1 = -6;
plot([itransition+0.5 itransition+1],[energy1 energy1],'k','Linewidth',5);
text(itransition+0.75,energy1-0.25,num2str(energy1,'%.2f'), ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
energy2 = -4.3;
plot([itransition+0.5 itransition+1],[energy2 energy2],'k','Linewidth',5);
text(itransition+0.75,energy2+0.25,num2str(energy2,'%.2f'), ...
'horizontalalignment','center', ...
'fontsize',12,'fontweight','bold');
h = text(itransition+0.75,(energy1+energy2)/2,'PC_{61}BM', ...
'horizontalalignment','center', ...
'fontsize',12,'fontweight','bold');
itransition = 5;
energy = -4.3;
plot([itransition+0.5 itransition+1],[energy energy],'k','Linewidth',5);
text(itransition+0.75,energy+0.25,num2str(energy,'%.2f'), ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
text(itransition+0.75,energy-0.25,'Al', ...
'horizontalalignment','center','fontsize',12,'fontweight','bold');
HOMOLUMO.png

Más respuestas (0)

Categorías

Más información sobre Array Geometries and Analysis en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by