怎么从matlab程序找出 错误在哪里?虽然有提示,但是说的一点不详细
function[MSE,VAR,badnode]=DV_hop(AreaSize,NodeCount,BeaconPer,RangeCom);switchnarginc...
function [ MSE,VAR,badnode] = DV_hop(AreaSize,NodeCount,BeaconPer,RangeCom);
switch nargin
case 0, AreaSize = 100;
NodeCount = 100;
BeaconPer = 10;
RangeCom = 20;
case 1, NodeCount = 100;
BeaconPer = 10;
RangeCom = 20;
case 2, BeaconPer = 10;
RangeCom = 20;
case 3, RangeCom = 20;
end
% 是否利用 已存储的数据进行仿真?
Flag_quick = 0;
if Flag_quick == 1
UNnode = load('UNnode_new.mat');
UNnode = UNnode.UNnode;
else
[ topo_BE,topo_UN ] = topology(AreaSize,NodeCount,BeaconPer,RangeCom);
[ BEnode ,UNnode ,Distance_all] = hops_all( topo_BE, topo_UN, RangeCom);
[ UNnode,badID ] = LS( UNnode,topo_BE,RangeCom);
end
[ UNnode,badID ] = LS( UNnode,topo_BE,RangeCom);
end
调用过程中, [ UNnode,badID ] = LS( UNnode,topo_BE,RangeCom);该句有错,提示 展开
switch nargin
case 0, AreaSize = 100;
NodeCount = 100;
BeaconPer = 10;
RangeCom = 20;
case 1, NodeCount = 100;
BeaconPer = 10;
RangeCom = 20;
case 2, BeaconPer = 10;
RangeCom = 20;
case 3, RangeCom = 20;
end
% 是否利用 已存储的数据进行仿真?
Flag_quick = 0;
if Flag_quick == 1
UNnode = load('UNnode_new.mat');
UNnode = UNnode.UNnode;
else
[ topo_BE,topo_UN ] = topology(AreaSize,NodeCount,BeaconPer,RangeCom);
[ BEnode ,UNnode ,Distance_all] = hops_all( topo_BE, topo_UN, RangeCom);
[ UNnode,badID ] = LS( UNnode,topo_BE,RangeCom);
end
[ UNnode,badID ] = LS( UNnode,topo_BE,RangeCom);
end
调用过程中, [ UNnode,badID ] = LS( UNnode,topo_BE,RangeCom);该句有错,提示 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询