Hi
Can you type the following into your shell and send the output:

cat list_matrix
for i in `cat list_matrix`;do echo $i; head $i; tail $i;done


Cheers
Saad


On 10 Apr 2018, at 07:49, Xinyang Liu <[log in to unmask]> wrote:

Dear Saad, dear experts,

Hi, sorry to repost my question again, since it has not been solved yet. Could you please take a look? Thanks. :)

Best regards,
Xinyang

Details are as below in my last email.

At 2018-04-08 21:38:20, "Xinyang Liu" <[log in to unmask]> wrote:
Dear Saad,

I ran the fdt_matrix merge with the list of matrix full paths but it could not run successfully. The command and information were as follows.

$ /u1/local/fsl/bin/fdt_matrix_merge list_matrix output
merge 3 files
terminate called after throwing an instance of 'MISCMATHS::SpMatException'
  what():  SpMat::SpMat::SpMat(string& fname): Last row must have zero value and indicate matrix size
Aborted

Could you please tell where is the problem?
Thanks a lot!

Best regards,
Xinyang



At 2018-04-08 18:59:17, "Saad Jbabdi" <[log in to unmask]> wrote:
The input should be a text that contains a list of file names (one per matrix that you want to add) with the full path to the file location.

Cheers
Saad

On 6 Apr 2018, at 10:00, Xinyang Liu <[log in to unmask]> wrote:

Dear Saad,

Hi, thanks a lot for your reply.

I put all the matrix file directory into a txt file and ran but failed. The information says, "terminate called after throwing an instance of 'MISCMATHS::SpMatException'" and "Last row must have zero value and indicate the matrix size".

Could you please provide more detailed information about this command? How should I produce the AsciiListOfMatrixFiles with the matrices?
Thanks.

Best regards,
Xinyang


At 2018-04-06 16:47:20, "Saad Jbabdi" <[log in to unmask]> wrote:
Hi - you can use
 fdt_matrix_merge <AsciiListOfMatrixFiles> <outputMatrixFile>

Cheers
Saad


On 6 Apr 2018, at 09:33, Xinyang Liu <[log in to unmask]> wrote:

Dear FSL experts,

Hi, is there any FSL command to sum up a group of 2D fdt_network_matrix which came out from multiple parallel runs of probtrackx2? Thanks!

Best regards,
Xinyang