Spatial Econometric Toolbox problem

Hello! I have a problem with Matlab that I can not solve.
Some time ago I downloaded a toolbox (unfortunately a bit 'dated) written by Kelley. This is the Spatial Econometrics Toolbox http://www.spatial-statistics.com/software_index.htm
A function calls a function written in Fortran 90.
The function reads as follows:
% call Fortran 90 MEX function
nnmat = tnn13 (xcoord, Ycoord, ms, n, istart);
tnn13 is in .dll format and is available in the available folder. Furthermore, in the first lines of the function there is written
% This function computes m spatiotemporal nearest neighbors for observation from 1 to (n-istart).
% This matlab function calls to Fortran 90 Mex function, tnn13.dll. For other platforms, the fortran source code is subdirectory
% in a subdirectory within the space_time subdirectory under the examples subdirectory.
The problem is that when I launch the function it comes out:
Error in fnn_mex2 (line 40)
nnmat = tnn13 (xcoord, Ycoord, ms, n, istart);
Error in x_spatiotemporal2 (line 80)
nnmat = fnn_mex2 (xcoord, ycoord, ms, n, istart);
Can someone help me to understand how to solve?
I installed Matlab 2014 on a windows 7.
Grazie mille!
Federico

8 件のコメント

Walter Roberson
Walter Roberson 2018 年 9 月 30 日
I suspect that you are missing a Visual Studio Runtime Redistributable.
Federico Dell'Anna
Federico Dell'Anna 2018 年 9 月 30 日
Many thanks Walter. In your opinion, what are the minimum system requirements to use this toolbox? Do I have to install any software, compiler?
Walter Roberson
Walter Roberson 2018 年 9 月 30 日
Are you using 32 bit MATLAB or 64 bit MATLAB?
Walter Roberson
Walter Roberson 2018 年 9 月 30 日
I do not see any dependency upon a run-time redistributable, but it does appear that the provided tnn13 is for 32 bit MATLAB only.
I see some documentation indicating that it could be recompiled from source for other versions.
Federico Dell'Anna
Federico Dell'Anna 2018 年 10 月 1 日
I installed the 32bit version, but MLAB always gives an error message: Invalid MEX-file
'C:\Users\Fede\Documents\spatial_toolbox_2\space\examples\SPACE_TIME\tnn13.dll': Impossibile trovare la procedura specificata.
Error in fnn_mex2 (line 40) nnmat=tnn13(xcoord,ycoord,ms,n,istart);
Error in x_spatiotemporal2 (line 80) nnmat=fnn_mex2(xcoord, ycoord, ms, n, istart);
Walter Roberson
Walter Roberson 2018 年 10 月 1 日
My tests suggest that it needs a version older than R2008a (unless the software were to be recompiled) . It was last updated in 2003, which is like MATLAB 6, R12 or so. I happen to have an installer for MATLAB 6.5 (R13SP1) sitting around, but that version is too old to run under Windows 10 (needs Windows 95 or Windows XP, refuses to run on Vista or later.) I think I might have a Windows XP virtual machine sitting around, but I am not going to look for it until later.
Federico Dell'Anna
Federico Dell'Anna 2018 年 10 月 1 日
Thank you so much Walter. I installed a virtual machine on the MAC and I run the function. I installed Win XP and Matlab 6. Thank you so much!
Federico Dell'Anna
Federico Dell'Anna 2018 年 10 月 2 日
編集済み: Walter Roberson 2018 年 10 月 3 日
I have another problem now. When i run the example given by the professor, matlab run. But when modify the function to fit it according my study, matlab gives this mex:
------------------------------------------------------------------------ Segmentation violation detected at Tue Oct 02 12:50:00 2018 ------------------------------------------------------------------------
Configuration: MATLAB Version: 6.5.0.180913a (R13) Operating System: Microsoft Windows XP Window System: Version 5.1 (Build 2600: Service Pack 3) Processor ID: x86 Family 6 Model 6 Stepping 1, GenuineIntel Virtual Machine: Java 1.3.1_01 with Sun Microsystems Inc. Java HotSpot™ Client VM (mixed mode)
Register State: EAX = 1479de6c EBX = 14713958 ECX = 0000000c EDX = 100a32c4 ESI = f62c1050 EDI = 00000001 EBP = 00000004 ESP = 00dfb23c EIP = 10071c8e FLG = 00010206
Stack Trace:
This error was detected while a MEX-file was running. If the MEX-file is not an official MathWorks function, please examine its source code for errors. Please consult the External Interfaces Guide for information on debugging MEX-files.
If it is an official MathWorks function, please follow these steps in reporting this problem to The MathWorks so that we have the best chance of correcting it:
1. Send this crash report to segv@mathworks.com for automated analysis.
For your convenience, this information has been recorded in:
C:\DOCUME~1\F\LOCALS~1\Temp\matlab_crash_dump.1900
2. Also, if the problem is reproducible, send the crash report to
support@mathworks.com along with:
- A specific list of steps that will reproduce the problem
- Any M, MEX, MDL or other files required to reproduce the problem
- Any error messages displayed prior to this crash report
A technical support engineer will contact you with further information.
Thank you for your assistance. Please save your workspace and restart MATLAB before continuing your work.
Error in ==> E:\a_1\tnn13.dll Error in ==> E:\a_1\fnn_mex2.m On line 40 ==> nnmat=tnn13(xcoord,ycoord,ms,n,istart);
Error in ==> E:\a_1\x_spatiotemporal2.m On line 82 ==> nnmat=fnn_mex2(xcoord, ycoord, ms, n, istart);
>>

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeTesting Frameworks についてさらに検索

製品

リリース

R2014a

質問済み:

2018 年 9 月 30 日

編集済み:

2018 年 10 月 3 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by