How to switch 64 bit matlab to 32 bit mode - matlab

I have some data files which are compatible with only 32 bit matlab.
However, my matlab is 64 bit.
is it possible to switch 64 bit matlab to 32 bit mode?
If yes, how?
Thanks.

Related

Does a 64 bit runtime run faster than a 32 bit?

Does a 64 bit run-time run faster than a 32 bit? Was our childhood a lie?
Backstory:
A runtime I really like has been updated to 64 bit. As a programmer, the only thing I could think of was that meant that you could create larger numbers and access more memory.
But growing up the newest consoles went from 8 bit, to 16 bit, then 32 bit and you won't guess what's next, 64 bit. So everyone knew 16 bit was better in every way, including speed, than 8 bit.
So when my favorite runtime says it's upgraded to 64 bit does it mean it's faster than the 32 bit? It's upgraded for Mac OS X and will be upgraded to 64 bit for Windows as well.
Also, it looks like Firefox just went 64 bit.
The processor word size (32 or 64) is somewhat independent of the the speed. Generally 64-bit processors are newer than those supporting only 32-bits, so they are inherently faster. However, manipulating more data, larger addresses is inherently slower than manipulating smaller data (shorter addresses).
Let's say that you have a library that does image processing (e.g., read/write JPEG files) in which you need to do 64-bit scaled integers (at 32-bits, you get serious rounding errors in JPEG). The 64-bit processor can add a 64-bit scale integer in one instruction. A 32-bit processor would take 3 or more instructions to do the same (inherently slower).
64 bits means access to more memory (if you use a CAD program you know what that means); not more speed. But, because 64-bit processors tend to be newer and faster, you generally get more speed; but not because of 64-bits.
Here is an answer from a low level developer, x64 can be very optimized because it has 8 additional 128 bit Multimedia XMM Registers, All 32 Bit registers are extended to 64 Bit, and an additional 8 General Purpose registers R8-R15. This all can be used to minimize memory access, computations, and copying large buffers which are the main slowdown for a CPU, programs in x64 already know there is SSE & SSE2 So they can benefit from these extensions without checking for them or creating double the functions. (there is also 256Bit AVX/512Bit AVX512).
The main thing about why they are called 64 bit is because these processors provide a 64 Bit Flat Address space when you can use 48 Bit Paging (256 TB) or (if supported) 57 Bit Paging (2^57 Bytes).

Passing variables to another MATLAB version

I have to work with an old fashioned program and I have to extract the data using a 32 bit MATLAB. After extracting the data, I will do some heavy processing on it. To speed up the processing, I'd like to use MATLAB 64 bit instead of 32.
How can I transfer the data from MATLAB 32 to 64 without saving and loading? Any other faster way?
Thanks,
Mina
You can use memmapfile to share the data via memory.

64 bit Vs 32 bit Executables

Almost all the executables in market comes in 32 bit and 64 bit versions.
It's a known fact that 32 bit executables would be compatible with 64 bit OS. But not the vice versa.
If this the case, then why do developers have to come with two different executables [32 bit and 64 bit versions] and why not distribute the 32 bit executable alone as the solution [saving the development time of another 64 bit executable].
Also like to know if the 64 bit executable does exist for the support of any performance basis.
Dave is exactly right. 64bit allows you to address more memory than 32 bit versions. The same transition happened when moving from 16bit to 32 bit back in the 90's too. Here's a good blog post which explains more than you ever wanted to know...
http://www.techsupportalert.com/content/32-bit-and-64-bit-explained.htm

Using Matlab 32 and 64 bit on the same machine, how do you store settings in a different place?

For various reasons I need to do things in 64 bit and 32 bit Matlab.
Much to my chagrin... I found out recently that settings for both 32 and 64 bit Matlab are both stored in the same folder:
C:\Users\$USERNAME\AppData\Roaming\MathWorks\MATLAB\$MATLAB_VERSION
Here is a simple thing that I try to do... and it fails because they share the same settings folder!:
open Matlab 32 bit
choose a 32 bit C/C++ compiler
compile some code
close Matlab 32 bit
open Matlab 64 bit
compile the same code
ERROR... your compiler is not 64 bits...
I get an error in the 64 bit matlab... because !ARG! as soon as I change something in matlab 32 bit... it changes the same setting in Matlab 64 bit! In this case the setting is the C/C++ compiler.
Is there any way to have all your settings for Matlab 32 bit and 64 bit in separate folders?
If yes, how?
If no, using the same settings folder is there a workaround for this specific setting (compopts.bat stores the C/C++ compiler you choose)?
Here is an example of what I would like to have:
C:\Users\$USERNAME\AppData\Roaming\MathWorks\MATLAB\$MATLAB_VERSION\32bit
C:\Users\$USERNAME\AppData\Roaming\MathWorks\MATLAB\$MATLAB_VERSION\64bit
You can change the location of the preferences directory using the MATLAB_PREFDIR environment variables. Refer to this technical solution for a complete instructions.

how does a wider data bus helps a CPU when internal register size is smaller?

What advantage did we have in using a wider external data bus, say 64 bit in first Pentium produced in 1993, when the size of the internal data bus or registers was 32 bit only?
General purpose registers may be only be 32 bits, but there are wider registers, e.g. floating point, MMX, SSE, which may be 64 bits or more.
Note also that whole cache lines are read/written from/to memory.
From Chapter 23 of 'The x86 PC Assembly language, Design and Interface' by Muhammad Ali Mazidi:
In the pentium, the external data buses are 64 bit, which will bring twice as much code and data into the CPU as the 486. However, just like the 386 and 486, Pentium registers are 32 bit. Bringing in twice as much as information can work only if there are two execution units inside the processor, and this is exactly what Intel has done.