Plotting vectors?

Anything that doesn't fit elsewhere.
Post Reply
ferron

Plotting vectors?

Post by ferron »

Hello, I'm using the e_extracellular as a "voltage source" for an extracellular electrode. I have a file which contains in the first column the "time" variable of my applied potential and the "M" other columns contains the voltages at each and every "z" of my axon.

objref field, potentialsfile
potentialsfile = new File("potentialsmatrix.txt")
potentialsfile.ropen()
field = new Matrix()
objref vex[stimnum], tvec
tvec = field.getcol(0) // reading the first column into tvec

for ii=0, stimnum-1{ // reading the other columns into vector "vex[]"
vex[ii] = field.getcol(ii+1)
}

objref field // free up space

I would like to obtain a graphical view of those two vectors... I mean
vex[] plotted in function of tvec... But I don't know how. I've tried to plot e_extracellular(0.5) on the same graphic as the node.v(0.5) but I get very strange things...

Thanks
ferron

update

Post by ferron »

Ok, I found how to plot the vector with the vec.plot function...

Which indeed brought up another question concerning the third arguments of the vec.play function "continuous"

Is it possible that the "When continuous is 1 then linear interpolation is used to define the values between time points." in the manual should be change to "By default, continuous is 1 and linear interpolation...."

Is it possible to stop the linear interpolation? I would like that the values passed to the play function remain stable untill the next value is given from the tvec?

Thanks
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

Unless the third arg of Vector.play is 1 or
the third arg is a Vector of discontinuity indices
of the second arg, the Vector being played is
considered to be a step function.
ferron

Post by ferron »

Well, the vector tvec is compose of time steps
0,5
1
1,5
2
2,5
...

And the vex[] comprise voltages values which I want to be applied at the time specified by tvec
10
0
10
0
10
...

I tought I would create a step stimulus with value 10 from 0,5 to 1 and then value 0 from 1 to 1,5, etc.

Instead I get a toothsaw stimulus... that's why I tought I was getting interpolation between the time steps.

Thanks
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Well, the vector tvec is compose of time steps
0,5
1
Is there an explanation on the WWW of why numbers with a fractional part are
written with , in some countries and . in others?
Instead I get a toothsaw stimulus... that's why I tought I was getting interpolation between the time steps.
Are you using fixed dt or adaptive integration? If fixed dt, what is the time step?
Post Reply