Fisher R to Z transform

We are trying to perform paired permutation t-test on r to z converted AEC correlation results of N*N matrices. We were wondering if there is a way to perform r to z Fisher transformation in brainstorm. Currently, we are using the MATLAB command Data=atanh(Data) prior to the t-test. However, it seems that the transformation sometimes generates NaN values that may affect the permutation test and also the FDR corrected p-values.
Thanks for any advice!

I'm not familiar with this transformation and can't give you any advice on the math part.
If you already know how to compute it in Matlab, this is probably something you could do with the process "Run Matlab command": https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#Custom_processing

Data=atanh(Data);

Then if you want to get rid of some NaN values, and replace them with a value of your choice (let's name it X), you could add a second line:

Data(isnan(Data))=X;