Hi Jeonghwan,
Yes sorry, this is an issue that I recently discovered with Matlab versions starting R2013a (R2013b is also concerned). The bug is related to a change in one variable which for a strange reason is now read as a column vector instead of a row vector. You'll find the patch attached: if you just copy this function in the $FREESURFER_HOME/matlab folder (and replace the older one with the same name), it should solve everything.
Let me know how it goes.

Nick,
Could you please integrate this updated function to replace the older one in the next FreeSurfer distribution? The updated function is compatible with all Matlab versions. And before the next FreeSurfer release, people running Matlab 2013 that wants to compute the LGI should be able to get the function from the mailing list archives, right?
Many thanks!

Marie





On Jul 29, 2013, at 7:27 PM, ??? ?????? <ssedis@me.com>
 wrote:

Hi,

I am trying to computer the LGI local gyrification index with freesurfer. I have Matlab on my machine. 
I got the following error: 


< M A T L A B (R) > Copyright 1984-2013 The MathWorks, Inc. R2013a (8.1.0.604) 64-bit (maci64) February 15, 2013 ---------------------------------------------------- Your MATLAB license will expire in 10 days. Please contact your system administrator or MathWorks to renew this license. ---------------------------------------------------- To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit www.mathworks.com. >> loading datas ... FREESURFER_READ_SURF [v 1.2 ] ...reading surface file: lh.pial ...reading triangle file ...adding 1 to face indices for matlab compatibility. ...done ( 0.03 sec) FREESURFER_READ_SURF [v 1.2 ] ...reading surface file: lh.pial-outer-smoothed ...reading triangle file ...adding 1 to face indices for matlab compatibility. ...done ( 0.01 sec) preparing outer mesh structure ... face 5000 / 128476 face 10000 / 128476 face 15000 / 128476 face 20000 / 128476 face 25000 / 128476 face 30000 / 128476 face 35000 / 128476 face 40000 / 128476 face 45000 / 128476 face 50000 / 128476 face 55000 / 128476 face 60000 / 128476 face 65000 / 128476 face 70000 / 128476 face 75000 / 128476 face 80000 / 128476 face 85000 / 128476 face 90000 / 128476 face 95000 / 128476 face 100000 / 128476 face 105000 / 128476 face 110000 / 128476 face 115000 / 128476 face 120000 / 128476 face 125000 / 128476 mesh_outer = vertices: [64240x3 double] faces: [128476x3 double] facesOfVertex: [64240x1 struct] preparing pial mesh structure ... ...searching for mesh edges...done (250.55 sec). ... creating path file for vertex 1 / 64240 area file for outer ROIs saved at 1 Improper assignment with rectangular empty matrix. Error in dsearchn (line 80) [d(i),t(i)] = min(sum((x-yi).^2,2)); Error in mesh_vertex_nearest (line 29) nearestIndex = dsearchn(vertices,points); Error in reorganize_verticeslist (line 28) [nextindex,nextvalue]=mesh_vertex_nearest(mesh_total.vertices(remaininglist,:),mesh_total.vertices(verticeslist(start_vertex),:)); Error in make_roi_paths (line 93) reorglist = reorganize_verticeslist (mesh_total, A, mesh_outer, perim, verticeslist, step); >> ERROR: make_roi_paths did not complete successfully! Darwin iui-MacBook-Pro.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64 recon-all -s 20130219-01 exited with ERRORS at Tue Jul 30 09:35:07 KST 2013 For more details, see the log file /Users/jeonghwan/Documents/freesurfer/ADHD-re/20130219-01/scripts/recon-all.log To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting



Any suggestions to correct my error?

Thanks,
Jeonghwan

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.