I need to find the latency of peak amplitude in each trial separately. I think I should write a matlab script but there is a problem. in some of my trials I have choosed some channels as bad ones. but these channels are quantified in matlab matrix and they will be included when I run my script.
is there any way to exclude them quickly?
or can I write my script in the brainstorm program?
thanks for your reply.
now I have finished my script. I want to see if it is possible to run it in brainstorm. I read the tutorial page titled “write your own script” but unfortunately I couldn’t insert it in pipelines even after saving it in brainstorm path. it seems that it does not know variables such as channelflag.
is it possible to run it in brainstorm or maybe writing a new command?
Dear Francois
I read the tutorial again and I changed one of the function structure but it didn’t appear on list.
It seems to be easier to work by runing the matlab command in the preprocess tab. but still I have a problem. the script is working when I use it in editor menu while the variables are open in workspace but it is not responding to my variables when I run it in brainstorm. the error message is :"undefined function or method "ChannelFlag’ for input arguments of type ‘double’.
also when I try to run the Function in Matlab I have this problem.
Hi Shadi,
When using the process “Pre-process > Run Matlab command”, you only have access to two variables: Data and TimeVector.
If you don’t want to go through the necessary steps to write a process, the easier for you is maybe simply to read the file from a script with Matlab “load” function.
Francois