help > MATLAB error - fread
Showing 1-2 of 2 posts
Display:
Results per page:
Jul 27, 2010  09:07 AM | Beatriz Paniagua
MATLAB error - fread

Hello all,

I am having problems to parameterization using SPHARM-MAT. The problem persists with any data I choose, so I assume is some problem due to my lack of experience using the program. This is the command messages I get when running the exact same experiment than the one contained in the SPHARM-MAT documentation pdf, section 3.2.1., page 20.

ParamCALD
anna_M1_r_obj: +4 = 5002 (5002) vertices * 2 - 10000 faces; 15000 edges
after pca min_max_number: 1 1
Solving simultaneous Linear Equations for latitude ...
Solving simultaneous Linear Equations for longitude ...
North Pole : 04987 (0.000000, -0.500000) pi
South Pole : 00026 (0.000000, 0.500000) pi
East Center: 03715 (-0.493613, -0.000078) pi
West Center: 04010 (0.512038, 0.002713) pi
Solving simultaneous Linear Equations for longitude ...
Solving simultaneous Linear Equations for longitude ...
==> reduce 64.221631, enlarge 20.898542, objmean 3.114567, prmmean 1.962201
--- anna_M1_r_CALD_ini: +4 = 5002 vertices * 2 - 10000 faces
save param_vs, obj_vs, faces, extents, reso to infile ...
read verts from outfile ...
??? Error using ==> fread
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in ==> smootheCALD>call_locsmo at 196
verts = fread(fid, vnum*3, 'double');

Error in ==> smootheCALD at 78
verts = call_locsmo(verts,vertices,faces-1,10,reso);

Error in ==> SpharmMatParamTriaMesh at 54
[vertices, faces, sph_verts, new_name] = smootheCALD(vertices, faces, sph_verts, name3, confs);

Error in ==> SpharmMatParameterization at 48
[vertices_new, faces_new, sph_verts_new, outNames{end+1}] = SpharmMatParamTriaMesh(file, confs);

Error in ==> SPHARM_MAT>RunTag_Callback at 601
SpharmMatParameterization(handles.userdata.ParamCALD, handles.userdata.inObjs, 'ParamCALD');

Error in ==> gui_mainfcn at 95
feval(varargin{:});

Error in ==> SPHARM_MAT at 70
gui_mainfcn(gui_State, varargin{:});

??? Error using ==> SPHARM_MAT('RunTag_Callback',gcbo,[],guidata(gcbo))
Error using ==> fread
Invalid file identifier. Use fopen to generate a valid file identifier.

??? Error while evaluating uicontrol Callback


Any feedback on the matter will be really appreciated!~
Thanks in advance,

BEATRIZ PANIAGUA
Jul 28, 2010  05:07 PM | Li Shen - University of Pennsylvania
RE: MATLAB error - fread
Dear Beatriz,

Thanks for your post. I am copying the discussion between you and Sungeun here, in case anyone else has a similar problem. If the LocalSmoothing executable is incompatible with your OS, you need to compile “LocalSmoothing.c” located in “C_sources” directory and copy the mex file to SPHAR-MAT root directory.

The following link contains the information about how to compile “LocalSmoothing.c” on Linux
http://imaging.indyrad.iupui.edu/project...
and it is very easy and you can issue a command on the Matlab command windows:
mex LocalSmoothing.c -lmwlapack -lmwblas

Thanks,

Li