?? ltusimulate.m
字號:
% LTUsimulate - simulates an LTU network for numIter time steps.%% [output,newStates] = LTUsimulate(LTUnetwork,states,inputs,numIter)% simlulates an LTUnetwork with states and input for numIter% time steps, returns the new states and the output.% LTUnetwork contains the information for connectivity and for % which cells in the network are input and output cells;% states is a vector containing a state (0 or 1) for each unit;% input is the numerical input values into the network;% numIter is the number of iterations to be simulated.%% output is a vector of network outputs (0 or 1);% newStates is the new state vector for the network.%% See also makeLTUsegmentNetwork, LTUsegmentMap, dataStructures.% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007% by Dirk B. Walther and the California Institute of Technology.% See the enclosed LICENSE.TXT document for the license agreement. % More information about this project is available at: % http://www.saliencytoolbox.netfunction [output,newStates] = LTUsimulate(LTUnetwork,states,inputs,numIter)% do the simulation cyclesfor iter = 1:numIter % set the states of the input units to the input states(LTUnetwork.input_idx) = inputs; % compute the activity propagation prop = states * LTUnetwork.connections; % apply thresholds states = double(prop >= LTUnetwork.thresholds);end% assign return valuesnewStates = states;output = states(LTUnetwork.output_idx);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -