Huge different between MatLab and operating systems?
1 view (last 30 days)
Show older comments
In the thread above, it was suggested that since I was running on a 32-bit operating system that I was going to run into memory issues. So I got a new computer, with windows 7/64-bit, and I just tried to run my code and it doesn't like my s-function that someone gave me, it says that they don’t exist.
I have 2 computers that run 2012a, one windows xp the other windows 7, and it runs on the windows xp system but not the other. Was there a big change between the operation systems? I didn't think porting my code to a different system would cause it to not work, since we’re using the save version of MatLab.
The error in the above link doesn’t happen in windows xp 2010a, only when I convert to 2012a. I think I tracked the error down for that though. I was looking at some documentation and I believe that one of the parameters we were using was updated to take in a different value. I can’t update my mex files because I don’t have a complier that will work with it, the LCC one MatLab includes threw errors when I tried to update everything.
1 Comment
Walter Roberson
on 17 Jul 2012
lcc cannot be used with 64 bit MATLAB. There are no-cost compilers that can be downloaded.
Accepted Answer
Ryan G
on 17 Jul 2012
Edited: Ryan G
on 17 Jul 2012
If you are running a 64-bit version of MATLAB you need the s-function to be compiled for 64-bit MATLAB. The extension on the mex-file will be mexw64 for 64-bit and if the extension is mexw32 then MATLAB will say it cannot find it on a 64-bit version.
If you have the code you should be able to run the same mex command to re-mex for 64-bit with no issues.
0 Comments
More Answers (1)
Jason Ross
on 17 Jul 2012
I'm speaking very generally.
From the standpoint of an application, 32-bit Windows XP and 32-bit Windows 7 are very similar. Same with 64-bit Windows. It's when you go from 32-bit Windows to 64-bit Windows that things begin to get very interesting, as the 32-bit applications run in a "WoW" (Windows on Windows) application mode. So generally, 32-bit applications will run on a 64-bit Windows, although if you hit one of the caveats you can really have trouble. Caveats include things like dependence on hardware drivers, compiling 32-bit things, 64-bit applications accessing 32-bit applications and other stuff that gets down into the nitty-gritty of computing -- which it sounds like you are getting into with the compiled mex files.
There is a list of supported compilers here: http://www.mathworks.com/support/compilers/R2012a/win64.html
I'd suggest getting the Microsoft Windows SDK 7.1, which is available for no charge and using that for compilation.
The other major difference between XP and 7 is the security model. XP has no concept of "privileged operations", while 7 does. Applications that worked in XP and did things that were "bad" security practices (writing to the windows system directory, inside program files, making changes to certain parts of the Registry, etc) might have trouble running on 7. There are a number of workarounds and tools to make things work, for example using the "compatability mode" settings that are documented at MS's web site and knowledgebase, although it's generally preferred to get an application that will work properly with the security model.
0 Comments
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!