The Nanoscale World

OBSOLETE! Troubleshooting set-up of the Matlab toolbox for Nanoscope Analysis

rated by 0 users
Not Answered This post has 0 verified answers | 6 Replies | 2 Followers

Top 10 Contributor
280 Posts
Points 6,221
Bruker Employee
Bede Pittenger posted on Thu, Jan 9 2014 4:05 PM

This post is now obsolete.  Please see http://nanoscaleworld.bruker-axs.com/nanoscaleworld/forums/t/2184.aspx

--------

Apparently there is a bug in the Windows SDK 7.1 that may cause issues when attempting to use the Nanoscope Analysis Matlab toolbox.  If you are having problems consider trying the following:

 

  1. Uninstall any preinstalled Visual C++ 
  2. Install the Windows SDK with the C++ options turned off
  3. Apply a patch to this installation (2):  http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=4422
  4. Install the redistributable version of Visual Studio 10 C++ 2010: x86 version: http://www.microsoft.com/en-us/download/details.aspx?id=5555 or x64 version: http://www.microsoft.com/en-us/download/details.aspx?id=14632

Thanks to customer Moritz for pointing this out to us.

--Bede

All Replies

Top 10 Contributor
280 Posts
Points 6,221
Bruker Employee

An even better description of this can be found here: http://www.mathworks.com/matlabcentral/answers/101105

  • | Post Points: 10
Top 10 Contributor
280 Posts
Points 6,221
Bruker Employee

Once you have the SDK installed correctly, you may need to set up the default compiler.  Here is what I did (I typed the stuff that is underlined):

>> mex -setup

 

Welcome to mex -setup.  This utility will help you set up  

a default compiler.  For a list of supported compilers, see  

http://www.mathworks.com/support/compilers/R2011b/win32.html 

 

Please choose your compiler for building MEX-files: 

 

Would you like mex to locate installed compilers Yes/n? y

 

Select a compiler: 

[1] Lcc-win32 C 2.4.1 in C:\PROGRA~2\MATLAB\R2011b\sys\lcc 

[2] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0 

 

[0] None 

 

Compiler: 2

 

Please verify your choices: 

 

Compiler: Microsoft Software Development Kit (SDK) 7.1 

Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0 

 

Are these correct Yes/n? y

 

*************************************************************************** 

  Warning: MEX-files generated using Microsoft Windows Software Development  

           Kit (SDK) require that Microsoft Visual Studio 2010 run-time  

           libraries be available on the computer they are run on. 

           If you plan to redistribute your MEX-files to other MATLAB 

           users, be sure that they have the run-time libraries. 

*************************************************************************** 

 

 

Trying to update options file: C:\Users\bede.pittenger\AppData\Roaming\MathWorks\MATLAB\R2011b\mexopts.bat 

From template:              C:\PROGRA~2\MATLAB\R2011b\bin\win32\mexopts\mssdk71opts.bat 

 

Done . . . 

 

************************************************************************** 

  Warning: The MATLAB C and Fortran API has changed to support MATLAB 

           variables with more than 2^32-1 elements.  In the near future 

           you will be required to update your code to utilize the new 

           API. You can find more information about this at: 

           http://www.mathworks.com/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9 

           Building with the -largeArrayDims option enables the new API. 

************************************************************************** 

 

  • | Post Points: 10
Top 500 Contributor
4 Posts
Points 46

Hello,

I am ttying to use the NSMatlabUtility with a Matlab test version R2015a. Even after I installed the Windows SDK 7.1, Microsoft Visual C++ 2010 and other components (following the instructions given e.g. at http://www.mathworks.com/matlabcentral/answers/101105-how-do-i-install-microsoft-windows-sdk-7-1) I get this error when I want to open data:

Error using NSMatlabUtilities/Open (line 36) Unable to load DataSourceDll.dll. Please install Microsoft Windows SDK 7.1 from http://www.microsoft.com/en-us/download/details.aspx?id=8279

when I do the "mex -setup", Matlabs tells me

MEX configured to use 'Microsoft Windows SDK 7.1 (C)' for C language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.

and also for "mex -setup cpp"

MEX configured to use 'Microsoft Windows SDK 7.1 (C++)' for C++ language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.

So to me it looks like Matlab is recognizing the SDK, but somehow the Utility not. Can it be, that the test version is missing some features? Is it important at which location the SDK is installed? What else can be wrong?

Best regards

Robin

  • | Post Points: 12
Top 10 Contributor
280 Posts
Points 6,221
Bruker Employee

Hi Robin,

Can you send me your contact info so that I can have a software person contact you?  My email is my firstname dot lastname at bruker dot com.

Thanks!

--Bede

  • | Post Points: 10
Top 10 Contributor
280 Posts
Points 6,221
Bruker Employee

Earlier this year the Matlab toolbox was significantly updated to support new data formats.  Additionally, it has been moved to a separate installer to make it easier to get set up and productive.  Please let me know if you would like an upgrade!

--Bede

  • | Post Points: 10
Top 75 Contributor
15 Posts
Points 167
王硕 replied on Thu, Oct 13 2016 2:16 AM

Dear Bede,

Errors in the manual of Matlab toolbox of the method CreateForceVolumeForceCurveZplot. I found this many years ago (maybe nanoscape analysis 1.4 or 1.5), I wander if it was corrected in the updated version. The description of the input parameters of method CreateForceVolumeForceCurveZplot (Get force curve from FV file ) was incorrect. The syntax should be,

 [xTrace, xRetrace, yTrace, yRetrace, xLabel, yLabel] = CreateForceVolumeForceCurveZplot (CurveNumber, UnitType, ChannelNumber)

 I hope this helps.

 Best regards,

Shuo Wang

 

 

  • | Post Points: 10
Page 1 of 1 (7 items) | RSS
Copyright (c) 2011 Bruker Instruments