how to give energy to nodes present in s_input struct

4 visualizzazioni (ultimi 30 giorni)
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 Commenti
kiranpreet kaur
kiranpreet kaur il 17 Nov 2016
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 il 17 Nov 2016
sir i want to give energy to each NB_NODE.................plz help in code

Accedi per commentare.

Risposta accettata

KSSV
KSSV il 17 Nov 2016
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

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by