Plotting the recorded traces

Plotting the recorded traces

The traces recorded by the recorder can be obtained by the command

    » t=csim('get',r,'traces')
which yields the output
t = 
    channel: [1x3 struct]
A closer look at e.g. the first channel reveals that is a struct array with a similar structure as we have seen above for the input signal:

ans = 

          idx: 1
    fieldName: 'psr'
         data: [1x2000 double]
      spiking: 0
           dt: 5.0000e-04

The output indicates that holds the psr trace ( with a resolution of 0.5ms ( See the Recorder class documentation for details abput the structure of the trace output. Similarly holds the the Vm trace and holds the output spike times. Hence the following command will plot the psr trace

    » plot(,;
and the command

    » stem(,ones(size(;
will draw the output spike train.

Using another set of plot commands one can easily create the following figure which shows the input, the postsynaptic response and the output of the neuron (the voltage and the spikes)


The full code of this example is contained as the file first_model.m in the demo directory of the CSIM package.

(C) 2003, Thomas Natschläger last modified 07/10/2006