non-blocking pause

19 sec read

Assume you have a presentation and you want it to stay on the screen for 10 seconds, you may write code something like
pause(10) or WaitSecs(10)

It’s fine except you can do nothing within those 10s. What if you want to do something else during the 10s (e.g check if subject pressed a button, or check if the scanner emits some signal)? In this case you should not use pause or WaitSecs, but instead use a while loop:

startTime = GetSecs;
while(GetSecs - startTime < 10)
    ... check keyboard input etc
end

nirs2img, create an image file from NIRS data

Update 2021/2/27: If you find griddata3 not working, try to change griddata3 to griddata. I was asked where to get nirs2img script. Here it...
Xu Cui
51 sec read

mergefile.m – a MatLab script to merge CSV files

My wife asked me to write a script to merge some csv files she has. Usually this can be accomplished by a simple command in...
Xu Cui
35 sec read

xjview 9.6 released

In this version, we modified the templates for 3-D render view and use a high-resolution template. It also includes a few scalp view. You...
Xu Cui
31 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading