Back to PLS Help

[SOLVED]Error:>> Problem with datamat function
ramsys
Posted on 04/01/15 07:51:58
Number of posts: 7
ramsys posts:

Hello dear all,

 

I am new to this PLS software and I have stucked in the PLS running. I am formating good (at least I believe so..) the datamat file and the my mask and when I am going to run PLS i got this error:

 

Undefined function 'datamat' for input arguments of type 'double'.
 
Error in struct_get_common (line 145)
        newdata_lst{i} = datamat(bmask, relative);
 
Error in struct_analysis (line 107)
  [behavdata_lst, newdata_lst, newcoords, dims, num_cond_lst, ...
 
Error in struct_analysis_ui>ExecutePLS (line 2450)
   [resultFile] = struct_analysis(PLSoptions.isbehav, ...
 
Error in struct_analysis_ui (line 129)
           ExecutePLS;
 
Error using waitfor
Error while evaluating uicontrol Callback
 
What is this datamat function? Where I can get it?? 
 
Thanks a lot in advance for you help
Best Regards
Dr. Manousos Klados

Replies:

Untitled Post
rmcintosh
Posted on 04/01/15 08:25:13
Number of posts: 394
rmcintosh replies:

Hello,

Can you give me a little more detail on what you did prior to running the analysis?  The datamat is a matrix that contains the images, so it seems that the matrix is not loading properly.



Untitled Post
ramsys
Posted on 04/01/15 14:47:30
Number of posts: 7
ramsys replies:

quote:

Hello,

Can you give me a little more detail on what you did prior to running the analysis?  The datamat is a matrix that contains the images, so it seems that the matrix is not loading properly.

Hello,

Thanks a lot for your quick reply. If datamat is a matrix and not a function you need more details indeed :). 

 

So I have some connectivity matrices (2d arrays) in nifti files and I formated datamat file using the structural tab. I used 1 condition and 200 subjects I saved the file and then I loaded to the Running PLS button in the section group and then I import behavioral data and run the PLS...

These details are enough or you need more to help me because I don't know what to do :(

 

Thank you a lot

Dr. Manousos Klados



Untitled Post
ramsys
Posted on 04/01/15 14:51:24
Number of posts: 7
ramsys replies:

Also I see inside the script that the function struct_get_common() doesn't have as input any variable datamat neither computes it somehow... The first use of this variable is in this line...



Untitled Post

I'm Online
nlobaugh
Posted on 04/01/15 15:11:32
Number of posts: 229
nlobaugh replies:

nice use of the structural module.. :-)

when you use that, you need to make sure that the mask you put  in is the same size as your connectivity matrix and is made up of 1's.  (I just made a small sample of 9 subjects with random 2d data, and it worked OK).

If you did that, check the contents of the nii header to make sure that nothing odd was entered..

You can also click the "check orientation" button when you make the datamat - it should look like one of your connectivity matrices

 

cheers

Nancy

 



Untitled Post
ramsys
Posted on 04/01/15 15:15:53
Number of posts: 7
ramsys replies:

quote:

nice use of the structural module.. :-)

when you use that, you need to make sure that the mask you put  in is the same size as your connectivity matrix and is made up of 1's.  (I just made a small sample of 9 subjects with random 2d data, and it worked OK).

If you did that, check the contents of the nii header to make sure that nothing odd was entered..

You can also click the "check orientation" button when you make the datamat - it should look like one of your connectivity matrices

 

cheers

Nancy

 

Thanks nancy...

 

I will check again the mask, but I don't think this is the probel... As I said before the function struct_get_common doesn't load some data to variable datamat and the first time that datamat appears is in the line mentioned above... Isn't this strange?? 



Untitled Post

I'm Online
nlobaugh
Posted on 04/01/15 16:30:13
Number of posts: 229
nlobaugh replies:

yes it is strange - can you post the full error message?

I have tested it with both sparse and full matrices - I only see a failure when all the .nii files are zero



Untitled Post

I'm Online
nlobaugh
Posted on 04/01/15 16:33:24
Number of posts: 229
nlobaugh replies:

sorry, missed the earlier post - if your still seeing the same error, check your mask file -



Untitled Post
ramsys
Posted on 04/02/15 02:50:26
Number of posts: 7
ramsys replies:

quote:

sorry, missed the earlier post - if your still seeing the same error, check your mask file -

Thanks for your help...The issue solved by loading a nii file and replacing the img. 

 

Probably as you said something wrong was in the headings...

 

Thanks again for your precious help




Login to reply to this topic.

  • Keep in touch

Enter your email above to receive electronic messages from Baycrest, including invitations to programs and events, newsletters, updates and other communications.
You can unsubscribe at any time.
Please refer to our Privacy Policy or contact us for more details.

  • Follow us on social
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube

Contact Us:

3560 Bathurst Street
Toronto, Ontario
Canada M6A 2E1
Phone: (416) 785-2500

Baycrest is an academic health sciences centre fully affiliated with the University of Toronto