-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFplt.m
52 lines (49 loc) · 1023 Bytes
/
Fplt.m
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
clear
clc
close all
%%
load('MAB.mat')
load('msk.mat')
load('TOMO2.mat')
load('idx.mat')
C=15;
hcmp=HCal(3,15,64);%计算色标中黑色部分占比
GP=["A1","A2","A3","A4","B1","B2","B3"];
%%
for p=1:7
figure('Position',[2060,-801,1024*0.75,2048*0.75])
tiledlayout(4,2)
for k=1:8
nexttile
colormap(hcmp)
imagesc(TO{p,k},'AlphaData',msk,[-C,C]);axis off equal;%T值
colorbar
title(gnm{2}(k,:));%情绪名)
end
sgtitle(GP(p))
end
%%
hcmp=HCal(0,15,64);%计算色标中黑色部分占比
figure('Position',[1,41,2000,1000])
tiledlayout(2,4)
for k=1:4
nexttile
colormap("turbo")
imagesc(MA{2*k-1}-MB{2*k-1},'AlphaData',msk);axis off equal;%T值
colorbar
title(gnm{2}(2*k-1,:))
end
for k=1:4
nexttile
colormap("turbo")
imagesc(MA{2*k}-MB{2*k},'AlphaData',msk);axis off equal;%T值
colorbar
title(gnm{2}(2*k,:))
end
%%
function [hcmp]=HCal(thr,mxc,nmc)
nsg=round(thr/mxc*nmc);
hmp=hot(nmc-nsg);
cmp=flipud([hmp(:,3) hmp(:,2) hmp(:,1) ]);
hcmp=[cmp;zeros(2*nsg,3);hmp];
end