英语翻译clc;clear all;close all;A =[ 0 1 Inf Inf 4 5 10 7;0 0 In
来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/05/14 14:58:45
英语翻译
clc;clear all;close all;
A =[ 0 1 Inf Inf 4 5 10 7;
0 0 Inf Inf Inf Inf 7 2;
0 0 0 1 Inf Inf 8 5;
0 0 0 0 6 9 Inf 3;
0 0 0 0 0 Inf Inf 4;
0 0 0 0 0 0 4 Inf;
0 0 0 0 0 0 0 Inf
0 0 0 0 0 0 0 0];
W=A+A';
D=[];T=[];S=[];
i=1;m=length(W);
S(1,1)=i;V=1:m;V(i)=[];D=[0;i];
n=2;[mD,nD]=size(D);
while isempty(V)
[td,j]=min(W(i,V));
tj=V(j);
for k=2:nD
[t1,jj]=min(D(1,k)+W(D(2,k),V));
t2=V(jj);T(k-1,:)=[t1,t2,jj];
end
t=[td,tj,j;T];[t3,t4]=min(t(:,1));
if t3==td
S(1:2,n)=[i;t(t4,2)];
else
t5=find(S(:,t4)~=0);
t6=length(t5);
if D(2,t4)==S(t6,t4)
S(1:t6+1,n)=[S(t5,t4);t(t4,2)];
else
S(1:3,n)=[i;D(2,t4);t(t4,2)];
end;
end
D=[D,[t3;t(t4,2)]];V(t(t4,3))=[];
[mD,nD]=size(D);n=n+1;
end;
S,D
clc;clear all;close all;
A =[ 0 1 Inf Inf 4 5 10 7;
0 0 Inf Inf Inf Inf 7 2;
0 0 0 1 Inf Inf 8 5;
0 0 0 0 6 9 Inf 3;
0 0 0 0 0 Inf Inf 4;
0 0 0 0 0 0 4 Inf;
0 0 0 0 0 0 0 Inf
0 0 0 0 0 0 0 0];
W=A+A';
D=[];T=[];S=[];
i=1;m=length(W);
S(1,1)=i;V=1:m;V(i)=[];D=[0;i];
n=2;[mD,nD]=size(D);
while isempty(V)
[td,j]=min(W(i,V));
tj=V(j);
for k=2:nD
[t1,jj]=min(D(1,k)+W(D(2,k),V));
t2=V(jj);T(k-1,:)=[t1,t2,jj];
end
t=[td,tj,j;T];[t3,t4]=min(t(:,1));
if t3==td
S(1:2,n)=[i;t(t4,2)];
else
t5=find(S(:,t4)~=0);
t6=length(t5);
if D(2,t4)==S(t6,t4)
S(1:t6+1,n)=[S(t5,t4);t(t4,2)];
else
S(1:3,n)=[i;D(2,t4);t(t4,2)];
end;
end
D=[D,[t3;t(t4,2)]];V(t(t4,3))=[];
[mD,nD]=size(D);n=n+1;
end;
S,D
这是迪克斯特拉算法
英语翻译clc;clear all;close all;A =[ 0 1 Inf Inf 4 5 10 7;0 0 In
matlab程序画图clc; clear all; close all;x=[0,1,2,3,4,5,6,7]; %输入
Matlab程序注译close all;clear all;clc;N_loop=100;EbN0=0:5:25;N0=
clc;clear all;
matlab中A(A==inf)=0是什么意思
matlab程序哪有错clear all; clc; [x,map]=imread('c:\matlab7\45.bmp
英语翻译Those born in the 1980s are accustomed to a world of inf
英语翻译inflation compensation as measured in the market for inf
英语翻译1 Splashtop Connect(Installed) 2 INF Update Utility(Inst
设函数f(x)有连续的导数,并且f(0)=f'(0)=1,求lim(x-->0){[f(sinx)-1]/Inf(x)}
计算反常积分I=int(log(x)/(x^2+1),0,inf),以上matlab程序解的答案是0,我要的是手算,
用matlab计算积分,int((1-1.2*x)^(-2),x,0,1)得到inf,为什么?手动计算应该是-5.