how to give energy to nodes present in s_input struct

4 次查看(过去 30 天)
s_input = struct('V_POSITION_X_INTERVAL',[0 30],...%(m) 'V_POSITION_Y_INTERVAL',[0 30],...%(m) 'V_SPEED_INTERVAL',[0.2 2.2],...%(m/s) 'V_PAUSE_INTERVAL',[0 1],...%pause time (s) 'V_WALK_INTERVAL',[2.00 6.00],...%walk time (s) 'V_DIRECTION_INTERVAL',[-180 180],...%(degrees) 'SIMULATION_TIME',500,...%(s) 'NB_NODES',repmat({10},1,11)};
  11 个评论
kiranpreet kaur
kiranpreet kaur 2016-11-17
s_input = struct('V_POSITION_X_INTERVAL',[0 30],...%(m) 'V_POSITION_Y_INTERVAL',[0 30],...%(m) 'V_SPEED_INTERVAL',[0.2 2.2],...%(m/s) 'V_PAUSE_INTERVAL',[0 1],...%pause time (s) 'V_WALK_INTERVAL',[2.00 6.00],...%walk time (s) 'V_DIRECTION_INTERVAL',[-180 180],...%(degrees) 'SIMULATION_TIME',500,...%(s) 'NB_NODES',repmat({10},1,11),..... 'energy',E);
kiranpreet kaur
kiranpreet kaur 2016-11-17
sir i want to give energy to each NB_NODE.................plz help in code

请先登录,再进行评论。

采纳的回答

KSSV
KSSV 2016-11-17
clc; clear all ;
s_input = struct('V_POSITION_X_INTERVAL',[0 30],...%(m)
'V_POSITION_Y_INTERVAL',[0 30],...%(m)
'V_SPEED_INTERVAL',[0.2 2.2],...%(m/s)
'V_PAUSE_INTERVAL',[0 1],...%pause time (s)
'V_WALK_INTERVAL',[2.00 6.00],...%walk time (s)
'V_DIRECTION_INTERVAL',[-180 180],...%(degrees)
'SIMULATION_TIME',500,...%(s)
'NB_NODES',repmat({10},1,11));
for i = 1:length(s_input)
s_input(i).ENERGY = rand ;
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by