Tips, Tricks & FAQs section

From VISTA LAB WIKI

Jump to: navigation, search

This page is a grab bag of things that bugged people about the computer environment. They found a solution and they want to remember it, they would add it here. We hope you will do the same: Please add tips, tricks and answers to Frequently Asked Questions. If you ran into a problem and figured out a solution, please share it!

Why doesn't this page have a Contents at its head?

[edit] Making Matlab & Microsoft Visual Studio 2010 work together: Compiling Mex files

Problem:

mex -setup doesn't detect Microsoft Visual Studio 2010 Professional.

Matlab 2010a and previous versions of Matlab don't yet (19th April, 2010) support Microsoft Visual Studio 2010 Professional. This can cause issues when compiling Mex files.


Solution Steps:

1) Install Microsoft Visual Studio 2008 Express

2) Use mex -setup to locate installed compilers. It will detect the Microsoft Visual Studio 2008 Express compiler

3) When mex finds a compiler, it generates a new file in C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2009b\mexopts.bat. Note: The path to mexopts.bat may vary, but thats ok as mex -setup tells you the path to the options file after the text Trying to update options file:

4) Open mexopts.bat with a text editor and find the line starting with set VSINSTALLDIR

5) Edit the path for VSINSTALLDIR to point to the path you installed Visual Studio 2010 in, e.g. change set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0 to set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 10.0

6) Depending on the mex files you are compiling (if mex complains about shared dlls / static links), you may also need to edit the line starting with set COMPFLAGS. If so, remove /MD from the end of the line.


Assumptions:

Microsoft Visual Studio 2010 is installed.


Notes:

If you re-run mex -setup the mexopts.bat file will be overwritten.

You could achieve all of the above without installing Microsoft Visual Studio 2008 Express, but installing it simplifies the solution and require less parameter tweaking.


Platforms:

Windows XP, Matlab 2009b, Microsoft Visual Studio 2010


Got Questions?

Contact: Mike Bennett

[edit] Forcing Matlab on Macs (Windows / Linux) to run in 32-bit mode

Problem:

Some Matlab applications depend on Matlab running in 32-bit mode, rather than 64-bit mode - such as the Psychtoolbox.

By default Matlab starts in 64-bit mode on more recent Macs. You can force it to start in 32-bit mode.


Solution Steps:

1) To force Matlab to start in 32-bit mode using the following command line:

    MATLAB_R2009b.app/bin/matlab -maci


Assumptions:

Matlab 2009b 64-bit and 32-bit installed


Notes:

The following is untested on Windows and Linux but it should work.

To force Windows Matlab to launch in 32-bit mode the Matlab command line should pass in -pcwin while for Linux it should pass in -glnx86

[edit] Adobe Reader Tips

Further to my earlier reply:

A new option introduced in Acrobat/Reader 8.0 lets you disable the activation of article threads when you click with the Hand tool:

Edit > Preferences, General, Basic Tools, turn off the "Make Hand tool read articles" option.


>Date: Thu, 23 Mar 2006 >To: Jon Harvey <JHarvey at cambridgesoft.com> >From: Shlomo Perets <shlomo2 at microtype.com> >Subject: Re: prevent click zoom in acrobat and reader >Cc: Framers at FrameUsers.com > >Jon, > >You wrote: > >>One thing that drives me crazy about acrobat and reader is that I get so >>many PDF files that zoom in whenever I click in the document window. It >>also happens on my own docs that I create. Is there a way to prevent >>this from happening? I looked in the acrobat 7.0 pro Help and it only >>mentions the zoom toolbar. This occurs without even having the toolbar >>open. >> >>How do I prevent docs from zooming in when I click on them? >


Platforms:

Mac 64-bit, Matlab 2009b


Got Questions?

Contact: Mike Bennett

Personal tools