MATLAB 绘图

 

matlab直接保存图形而不显示图形_matlab直接保存图片不显示_faith默默的博客-CSDN博客

 

Matlab中图片保存的四种方法 - 技术蛀虫 - 博客园 (cnblogs.com)

 

暴力参数遍历

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
clear all
tic
N_L = 10; N_M = 10; N_N = 10;
L1 = linspace(-5.28,-6.98,N_L);
M1 = linspace(-1.25,-3.26,N_M);
N1 = linspace(-6.26,-8.00,N_N);
tmp = zeros(N_L*N_M*N_N,3);
index = 1;
for i_L = 1:N_L
    for i_M = 1:N_M
        for i_N = 1:N_N
            tmp(index,:) = [L1(i_L);M1(i_M);N1(i_N)];
            index = index + 1;
        end
    end
end
 
%%%%%%%%%%%%%%%%%%%%%%%%%% Reference Data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load SiNW1_3nm_vogl_valence.mat
kpoints_ref = kpoints(601:1200,:);
energies = energies(563:576,:); % 573£º576
energies = energies';
energies_ref = energies(601:1200,:);
 
 
for i = 1:N_L*N_M*N_N
     
    L = tmp(i,1);
    M = tmp(i,2);
    N = tmp(i,3);
 
h = figure(1);
set(h,'visible','off')
%figure('visible','off')
kpath = kpoints2kpath(kpoints_ref);
plot(kpath,energies_ref,'k');
ylim([-2,-0.5]);
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%% Initial Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
kpoints = generate_k([0,0,0],[0,0,3.1415916/3], 61);
 
% L = -5.53;M = -3.64;N = -8.32;
% L = -5.88; M = -2.16; N = -7.26;
E0 = -0.562259615;
 
params = [L,M,N,E0];
energies = nanowires_valence(params,kpoints);
 
kpath = kpoints2kpath(kpoints);
%figure;
hold on
%figure('visible','off')
plot(kpath,energies,'r');
ylim([-2,-0.5]);
title(['L:', num2str(L),' M:', num2str(M),' N:', num2str(N)])
 
filename = [num2str(i),'_',num2str(L),'_',num2str(M),'_',num2str(N),'.png'];
%print(gcf,'-dpng','abc.png') 
saveas(gcf, filename)
close all
 
 
end
toc

  

posted @   ghzphy  阅读(60)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
历史上的今天:
2022-05-19 临时链接
2022-05-19 开通博客
点击右上角即可分享
微信分享提示