-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfigure3d.m
More file actions
52 lines (49 loc) · 920 Bytes
/
figure3d.m
File metadata and controls
52 lines (49 loc) · 920 Bytes
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
% ===================================
% Author:lsqls
% github:https://github.com/lsqls
% Email:764666894@qq.com
% 代码太次,需要改进
% ===================================
clear
figure(1)
a=20;
B=[];
S=0:1:50;
for s =S
B(end+1)=erlangBb(s,a);%对数组内的元素逐个求值
end
plot(S,B),xlabel("中继线"),ylabel("阻塞率"),title("呼叫量a=20");%绘图
clear
figure(2)
s=20;
B=[];
A=0:0.01:20;
for a =A
B(end+1)=erlangBb(s,a);
end
plot(A,B),xlabel("呼叫量"),ylabel("阻塞率"),title("中继线s=20");
clear
figure(3)
b=0.001;
S=[];
A=10:0.01:20;
for a=A
S(end+1)=erlangBs(b,a);
end
plot(A,S),xlabel("呼叫量"),ylabel("中继线"),title("阻塞率b=0.001");
clear
figure(4)
S=0:50;
B=[];
AE=[];
SE=[];
for s=S
A=0:1:60;
for a=A
AE(end+1)=a;
SE(end+1)=s;
B(end+1)=erlangBb(s,a);
end
end
plot3(SE,AE,B),xlabel("中继线"),ylabel("呼叫量"),zlabel("阻塞率");%plot3需要更换
clear