AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
Daniel Glen
May 19, 2008 05:36PM
You could use 3dcalc with relative indexing on pseudo-time as in this example below. The result shows 1 when switching from 1 to 0, -1 when switching from 0 to 1. You can easily change this to the reverse, or use an equals operator to only test for equality between a and b.

% more test.1D
1
0
0
0
1
1
0
0
1

% 3dcalc -a test.1D\' -b 'a+l' -expr 'a-b' -prefix testout.1D
++ 3dcalc: AFNI version=AFNI_2008_02_01_1144 (Mar 27 2008) [32-bit]
++ Authored by: A cast of thousands

% more testout.1D
1
0
0
-1
0
1
0
-1
0
Subject Author Posted

calculating switches

Zhihao Li May 19, 2008 05:19PM

Re: calculating switches

Daniel Glen May 19, 2008 05:36PM