📄 deallamda.m
字号:
function [ Passby,time2,Ptemp ] = deallamda( LAMDA )
%UNTITLED1 Summary of this function goes here
% Detailed explanation goes here
%在一列中分别对应 A1 ,A2,...,A15。其中A1未编号。程序要根据编号来进行考虑
times=10;%存放第二维的大小
time2=0;
Passby=zeros(14,times,7);%considerate 10 times is enough
for i=1:7
P=zeros(1,times);
lamda=LAMDA(i,:);
temp=0;
for j=25:38 %compute every point of S ,that is,How they get to the A points;
temp=lamda(j);
k=1;
while(temp~=-1)%进行搜索,直到搜到起点起点的lamda为-1
if(k>times)
time2=k;
end
P(k)=temp;
temp=lamda(temp);
k=k+1;
end
if(time2>times) %动态的设置维数
Passby(14,time2,7)=0;
times=time2;
end
Passby(j-24,:,i)=P;
P=zeros(1,times);
end
end
Ptemp=zeros(15,times+1,7);
tempw=ones(1,1,7)*25;
Ptemp(1,:,:)=[tempw,Passby(1,:,:)];
Passby(14,times+1,7)=0;
Ptemp(2:15,:,:)=Passby(:,:,:);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -