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  

|
January 26, 2009 10:19AM
Hi Afni-users,

I've been making some scripts for my analysis in Matlab. Some of the steps involve sourcing AFNI commands to the system. I've been running into troubles with the 3dUndump command.

---
%Sample code (first built a string and then send that command to the system):
%seed_dir and seed_name are variables that I assign earlier in the script

cmd = ['source ~/.bashrc; echo -45 -67 36 | 3dUndump -prefix ' seed_dir seed_name '.nii.gz -master /Users/Shared/fsl_410/data/standard/MNI152_T1_2mm_brain.nii.gz -srad 5 -orient LPI -xyz -'];

system(cmd);
---

However, this produces a ROI that is not in the right location. Just copying this command to the terminal and executing it there DOES produce the correct result! I checked that the command is built correctly and the numbers are not changed by matlab.

Is this a known problem? I do not understand how this can happen as all matlab does is send a string to the system to execute, it should not influence its execution at all...

Thanks,
Maarten

Subject Author Posted

3dUndump trough Matlab of from terminal does not produce same result

Maarten Mennes January 26, 2009 10:19AM

Re: 3dUndump trough Matlab of from terminal does not produce same result

Daniel Glen January 26, 2009 12:33PM

Re: 3dUndump trough Matlab of from terminal does not produce same result

Maarten Mennes January 27, 2009 05:37PM

Re: 3dUndump trough Matlab of from terminal does not produce same result

Daniel Glen January 28, 2009 11:05AM

Re: 3dUndump trough Matlab of from terminal does not produce same result

Maarten Mennes January 28, 2009 02:16PM

Re: 3dUndump trough Matlab of from terminal does not produce same result

Daniel Glen January 28, 2009 02:33PM