Undefined function or variable 'matlabrc'.

835 views
Skip to first unread message

Cyril

unread,
Feb 21, 2017, 10:54:23 AM2/21/17
to MAINSAR
Hello,

I have some errors which seems to be link with matlab which is not interact properly with cygwin. and I'm stuck for one week with that issue.

I've always this error when using the script make_coreg :

ERROR   : [ioroutines.cc[2443]]: Unable to open input file: fc_pos.in in source file: ioroutines.cc at line: 1914

ERROR   : [ioroutines.cc[2445]]: Missing a required file: fc_pos.in

Matlab is install on windows 8 64 bits btw.

If I set the MATLABPATH in the file StaMPS_CONFIG.bash (export MATLABPATH=$STAMPS_WIN/matlab:`echo $MATLABPATH`
); many functions are undefined on matlab, path seems totally deleted except for the new path setup and there are these errors :

Warning: Directory access failure: C:\cygwin32\home\cpoitevi\software\StaMPS_v3.3b1\matlab:\
Undefined function or variable 'matlabrc'.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at com.mathworks.mlwidgets.graphics.ModelStateFactory.createNoSelectionModelState(ModelStateFactory.java:242)
    at com.mathworks.mlwidgets.graphics.PlotToolSetFactory$3.parseComplete(PlotToolSetFactory.java:127)
    at com.mathworks.mlwidgets.graphics.ModelStateFactory$ProductInfoListener$1$1.run(ModelStateFactory.java:1023)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
com.mathworks.jmi.MatlabException: Undefined function or variable 'userpath'.
    at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
    at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:219)
    at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
    at com.mathworks.jmi.Matlab.mtFeval(Matlab.java:1540)
    at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:197)
    at com.mathworks.appmanagement.GetAppInstallDirectoryWorker.doOnMatlabThread(GetAppInstallDirectoryWorker.java:20)
    at com.mathworks.appmanagement.GetAppInstallDirectoryWorker.doOnMatlabThread(GetAppInstallDirectoryWorker.java:7)
    at com.mathworks.appmanagement.AbstractAppManagementMatlabWorker.runOnMatlabThread(AbstractAppManagementMatlabWorker.java:21)
    at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
    at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:364)


I've try many different things but I have no idea.... Do you have a proper solution for that or some idea to explore ?

Thank you.

Best regards.

Cyril

Karsten Spaans

unread,
Feb 21, 2017, 10:58:42 AM2/21/17
to mai...@googlegroups.com

This is most likely related to Matlab being installed under Windows. StaMPS was developed for UNIX, and you'll encounter quite a few incompatibilities you're going to have to resolve to run StaMPS under windows.

Karsten

--
You received this message because you are subscribed to the Google Groups "MAINSAR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mainsar+u...@googlegroups.com.
To post to this group, send email to mai...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cyril

unread,
Apr 5, 2017, 9:39:34 AM4/5/17
to MAINSAR
Hi, thanks for your answer.

I've managed to make it work, the call of matlab scripts are not correct for windows :

OLD =>matlab -nojvm -nosplash -nodisplay < $STAMPS/matlab/batchjob.m >> make_coreg.log
NEW => matlab -nojvm -nosplash -nodisplay -r batchjob -logfile make_coreg.log

I also add a file "startup.m" in "C:\Program Files\MATLAB\R2013a\toolbox\local" with the path towards StaMPS scripts

addpath C:/cygwin32/home/user/software/StaMPS_v3.3b1/matlab
addpath C:/cygwin32/usr/local/bin

Good luck !
Cyril

hamid reza Kohbanani

unread,
Dec 4, 2018, 7:54:48 AM12/4/18
to MAINSAR

Dear Cyril
Thank you for your guide. The question is why you have given path of ( C:/cygwin32/usr/local/bin). For me, this path is empty.
thanks
Hamid
Reply all
Reply to author
Forward
0 new messages