MATLAB:UndefinedFunction

447 views
Skip to first unread message

Sittaya Buathong

unread,
Feb 10, 2022, 1:45:31 PM2/10/22
to NODDI
Dear All,

I am trying to process my own dataset with the NODDI toolbox after pre-processed it using FSL tools. During batch_fitting_single, there will be messages that show in every fitting voxel

MException with properties:

    identifier: 'MATLAB:UndefinedFunction'
       message: 'Undefined function 'fmincon' for input arguments of type 'function_handle'.'
         cause: {}
         stack: [4×1 struct]
    Correction: []

The program will run till the end, but the all output volumes are all error. Is there anything I can do to solve this issue?

Thanks you very much,
Sittaya

Gary

unread,
Feb 10, 2022, 1:49:04 PM2/10/22
to NODDI
Hi Sittaya,

Were you able to run the toolbox successfully on the provided example? The error messages you saw seem to suggest you don't have the Matlab Optimisation toolbox, which is a required component as explained in our guidance.

Gary

Sittaya Buathong

unread,
Feb 12, 2022, 5:53:51 AM2/12/22
to no...@googlegroups.com
Hello Garry,

Thank you very much for pointing out that I forgot to download the optimization toolbox. After I installed it, I can process the provided sample smoothly without any errors. However, it still shows other error messages while processing my own data (from Philips 3.0T) in batch_fitting_single step in every fitting voxel.
For example;

Fitting voxel 670
  MException with properties:

    identifier: 'optimlib:optimfcnchk:checkfun:NaNFval'
       message: 'Supplied function 'fobj_rician_fix' returned NaN when evaluated;↵ FMINCON cannot continue.'
         cause: {[1×1 MException]}
         stack: [6×1 struct]
    Correction: []

It can run till the end, but the result is still the same as before I install optimization toolbox. The error code map contains only the value=2 in every voxel. Is there any possibility that I did something wrong in the preprocess steps?  Also, I am not sure if there is any problem from using the same file for roi_mask and brain_mask.  

Thanks in advance,

Sittaya

--
You received this message because you are subscribed to a topic in the Google Groups "NODDI" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/noddi/Yub3pnPj29M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to noddi+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/noddi/0eaa88e5-cea8-4666-ad55-4e8ee42efcffn%40googlegroups.com.

Hui Zhang

unread,
Feb 14, 2022, 11:11:22 AM2/14/22
to no...@googlegroups.com
Hi Sittaya,

It seems that the issue probably concerns the DWI data.  Have you had a chance to review my tutorial on how to explore DWI data?  This is available on this page:


The tutorial may help you check if your DWI data is formatted or preprocessed appropriately.  Keep me posted on how you get on.

Gary


You received this message because you are subscribed to the Google Groups "NODDI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to noddi+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/noddi/CAMY1C8qR7BNRN6rJ4NKPDtm9KAH5%3DXk4Ono4FWTqmyQmTuS7OA%40mail.gmail.com.

Hui Zhang

unread,
Feb 14, 2022, 11:21:17 AM2/14/22
to no...@googlegroups.com
Hi Sittaya,

Can you take a look at this new discussion thread?


You may be encountering exactly the same issue.

Gary

Sittaya Buathong

unread,
Feb 21, 2022, 6:26:15 AM2/21/22
to no...@googlegroups.com
Hi Garry,
Thank you very much for your prompt reply. It is very helpful. I have tried to look at my bval and bvec datas as you suggested. Then, I found that my bval format did not match yours : 
    0, 1000, 1000, ... 1000, 2000, 2000, ... 2000
So I replaced the first 2000 values, which corresponds to bvecs = 0, to 0 :
    0, 1000, 1000, ... 1000, 0 , 2000, ... 2000
After that it can run smoothly without any error which results in all output volumes. I am not sure this is a corrected method and does not cause any interference of each value in any output volumes. Or should I look for another way ? 

Thank you very much,
Best regards, 

Sittaya

Hui Zhang

unread,
Feb 21, 2022, 2:20:30 PM2/21/22
to no...@googlegroups.com
Can you attach your bvalue and bvector files?

Gary

Sittaya Buathong

unread,
Feb 21, 2022, 10:19:41 PM2/21/22
to no...@googlegroups.com
Hi Garry,
Here are my bval and bvec files.
Thanks in advance, 
Sittaya


NODDI_protocol.bval
NODDI_protocol.bvec

Hui Zhang

unread,
Feb 22, 2022, 1:45:06 PM2/22/22
to no...@googlegroups.com
Thanks Sittaya.  You should be able to tell if the volume with bvec [0 0 0] is acquired with b=0 or not based on its contrast.  What can you conclude?

At any rate, you may want to speak to your MR physicist who set up the protocol for you.  Something seems to have gone wrong with the set up.

Gary


Sittaya Buathong

unread,
Feb 22, 2022, 2:02:57 PM2/22/22
to no...@googlegroups.com
Hi Garry, 

That point is also my concern. Based on its contrast, only the first volume with bvec [0 0 0] is acquired with b=0, but the second one which is the 34th volume is not (It's likely acquired with b = 2000).  Anyway, I will try to check my protocol with our department physicists.

Best regards, 
Sittaya

Sittaya Buathong

unread,
Mar 5, 2022, 7:12:49 AM3/5/22
to no...@googlegroups.com
Hello Garry, 
Thank you very much for your help. After checking the protocol, I can process my own dataset with wonderful results eventually. 

Best wishes, 
Sittaya

Hui Zhang

unread,
Mar 5, 2022, 9:16:17 AM3/5/22
to no...@googlegroups.com
Glad to hear that.  Did you figure out the cause of the problematic b-val/b-vec pair?

Gary

Sittaya Buathong

unread,
Mar 5, 2022, 1:56:35 PM3/5/22
to no...@googlegroups.com
It will work well if it has b=0 volume with bvec [0 0 0] between the last volume with b= 1000 and the first volume with b =2000 in my protocol. Thank you so much for your guidance. :)

Sittaya

Reply all
Reply to author
Forward
0 new messages