how to give energy to nodes present in s_input struct

조회 수: 4 (최근 30일)
kiranpreet kaur
kiranpreet kaur 2016년 11월 17일
답변: KSSV 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)};
  댓글 수: 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