It's the bitness of the MATLAB version that matters, not the bitness of the Windows OS. If you compile in a 32-bit version of MATLAB, the executable will run as a 32-bit application on any OS that can run 32 bit applications. Since both 32-bit and 64-bit Windows OS can run 32-bit applications, an executable created under 32-bit MATLAB can be deployed pretty much to any Windows OS.
Conversely, if you compile in a 64-bit MATLAB version, the executable will run as a 64-bit application. I believe only 64-bit Windows can run 64-bit applications. Therefore, you must deploy to a 64-bit Windows machine in this case.
Note however that 32-bit MATLAB can be installed under either a 32-bit or 64-bit Windows OS. So, even if you are working on a machine with a 64-bit Windows OS, if you have a 32-bit MATLAB version installed there, you can use it to create 32-bit executables for deployment to a 32-bit (or 64-bit) target OS if you want to .
Best Answer