hi Quan, the error message is quite clear - it could not find the mesh files. you must create those mesh files and pass on the filename stub (the ??? part of node_???.dat and elem_???.dat) to the input json file.
if you go to mmc/examples, all provided examples include externally stored node/elem data files. you should follow those examples if you have to use mmc.
however, since you use matlab, I strongly encourage you using mmclab instead of mmc - mmclab directly passes on matlab arrays/structs to mmc and saves all the overheads of reading/writing data files - file IO is the slowest part of modern computers.
--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mcx-users/CAOvA73QZ%2BVxcAtzF%2BAS2Zz87XYYCciK0CZXHOQpQa_5HJQh2mA%40mail.gmail.com.

hi Quan, the error message is quite clear - it could not find the mesh files. you must create those mesh files and pass on the filename stub (the ??? part of node_???.dat and elem_???.dat) to the input json file.
hi Quan,
your question needs better clarity.
those *.mat files were not part of mmc - you must have created those yourself. I don't know what's in those files, so I can't answer your question how to handle those files.
mmc does not know how to read .mat file. it only cares the {node,elem,prop,facenb}_XX.dat files that were generated by savemmcmesh.m. whatever data you have, you need to pass those to savemmcmesh and generate those files that mmc can use.
Another question: in the following example, I am curious about how you can define the srcpos so precisely, e.g., 67.38, 167.5 ( Definitely, we should consider the curvature of the human head model.)?
why not? please read how mmc/mcx's detector works in this FAQ
https://mcx.space/wiki/index.cgi?Doc/FAQ#How_does_MCX_capture_detected_photons
Also, for the detpos, what does the '3' mean?
detector radius.
https://github.com/fangq/mmc/blob/v2025.10/mmclab/mmclab.m#L89
and also the above FAQ
Qianqian
To view this discussion visit https://groups.google.com/d/msgid/mcx-users/CAOvA73S0d6hzeXjNW39_H6hxzFE9Xd4zBF0MZ0%3DUqfC-xQdOig%40mail.gmail.com.