Code covered by the BSD License  

Highlights from
ParallelC

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 1.8 KB File ID: #25832

ParallelC

by Geoffrey

 

13 Nov 2009 (Updated 18 Nov 2009)

This file allows you to access a virtual Parallels drive while running Matlab on a MAC OSX.

| Watch this File

File Information
Description

I run Matlab on an Intel MACPro through X11 in OSC and through a vista virtual machine using Parallels. This program simplifies directory switching so I can easily access the virtual drives created by Parallels.

Parallels creates a directory in '/tmp' that provides access to any virtual drives. This directory is always numeric and changes whenever parallels is restarted. Thus, the script must be able to search for the proper directory. This code supplies two simple methods for achieving that goal.

function []=ParallelC()
 R=dir('/tmp'); % Get directory names
 for n=1:length(R), % Scan through directory names
    R1=exist(['/tmp/', R(n).name, '/C/']); % See if the directory exists.
    if R1==7, % Exist returns 7 if A is a directory
     eval(['cd /tmp/', R(n).name, '/C/']); % Go to the appropriate directory
    break, end % Program is finished
 end

MATLAB release MATLAB 7.5 (R2007b)
Other requirements MAC OSX, Parallels Virtual machine
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
18 Nov 2009

Changed the file to a function so it relies only on local variables.

18 Nov 2009

Put code into description.

Tag Activity for this File
Tag Applied By Date/Time
virtual drive Geoffrey 13 Nov 2009 12:17:48
parallels Geoffrey 13 Nov 2009 12:17:48
directory Geoffrey 13 Nov 2009 12:17:48

Contact us at files@mathworks.com