Dear Bruce,

I see. I will just shift everything by one.

Thank you!

Sincerely,
Ye


On Wed, Jun 18, 2014 at 9:14 PM, Bruce Fischl <fischl@nmr.mgh.harvard.edu> wrote:
Our indices are zero based, and matlab is one based. That is probably the problem
Bruce

> On Jun 18, 2014, at 1:09 PM, ye tian <tianye730@gmail.com> wrote:
>
> Dear Freesurfers,
>
> I tried the following in matlab
>
> [coords,faces]  =read_surf('\subject\surf\rh.orig')
>  Hp = patch('vertices',coords,'faces',faces(:,[1 3 2]),...
>  'facecolor',[.5 .5 .5],'edgecolor','none')
>  camlight('headlight','infinite')
>  vertnormals = get(Hp,'vertexnormals');
>
> Matlab returns the following error:
> Error using patch
> Faces values must be >= 1.0
>
> Indeed, there are 0's in faces. Is this a mistake?
>
> Thank you very much!
>
> Sincerely,
> Ye
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
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.