| Author |
Topic  |
|
|
evan.gordon
BIAC Alum

12 Posts |
Posted - Apr 01 2005 : 09:28:51 AM
|
I was wondering if it would be possible to install Matlab 7.0 on golgi. I need Matlab 7.0 to read some data that was generated using Matlab 7.0 on the Windows computers.
Evan |
|
|
charles.michelich
BIAC Alum
   
USA
183 Posts |
Posted - Apr 01 2005 : 09:53:09 AM
|
Starting with MATLAB 7, Mathworks dropped support for many platforms including AIX, Alpha TRU64 UNIX, HP-UX, SGI IRIX, Windows 98, Windows ME, and Solaris 2.7. Also, MATLAB R14 SP2 (7.04) is the last version that will support Windows NT and they are planning to drop support for HP-UX at the end of the year.
Therefore, we will not be able to upgrade past MATLAB 6.5.2 on AIX unless MathWorks changes thier platform support in the future. Code which works on MATLAB 6.5 should work on MATLAB 7 with few, if any, modifications. The MATLAB 7 release notes detail the relevant changes. One notable exception is that the .mat format was changed on MATLAB 7. However, if you save your .mat files using the '-v6' option in MATLAB 7, you can read them in MATLAB 5 and later. Because the -V6 flag is not supported by the save command in MATLAB versions before 7, if you simply add -V6 to all of your save commands, the code will not work on either versions on MATLAB. The following code can be used to save variables on MATLAB 5 and later.if str2double(strtok(version,'.')) >= 7
% Save variables for MATLAB 5 & 6 compatibility
save(filename,'var1','var2','-V6');
else
save(filename,'var1','var2');
end
|
Edited by - charles.michelich on Apr 01 2005 09:57:04 AM |
 |
|
|
evan.gordon
BIAC Alum

12 Posts |
Posted - Apr 01 2005 : 10:02:00 AM
|
| Well, the problem with that is that the .mat files I need to read are created by SPM, which does not use the '-v6' flag. Also, the 'ensure backwards compatibilty by default' option in the Matlab preferences is nonfunctional. Is there any other way I can get golgi to read a .mat file generated by SPM on a windows machine? |
 |
|
|
deshmukh
BIAC Alum
 
40 Posts |
Posted - Apr 01 2005 : 10:25:44 AM
|
I would suggest loading the mat file generated by SPM on the Windows machine into the workspace and then saving the workspace in the v6 format as a new mat file to supply to golgi. This is ofcourse a temporary work around.
|
 |
|
|
charles.michelich
BIAC Alum
   
USA
183 Posts |
Posted - Apr 01 2005 : 10:25:45 AM
|
If it is a limited number of files, you could load the file and resave it with the '-V6' with the code such as the following:clear
load(filename, '-MAT');
names = who;
save(outfilename, names{:}, '-MAT', '-V6');Note that this code saves all the variables in the workspace, so the clear at the beginning is critical. If you know what variables are in the .mat file, you could just list them explicitly instead. |
Edited by - charles.michelich on Apr 01 2005 10:28:10 AM |
 |
|
|
charles.michelich
BIAC Alum
   
USA
183 Posts |
Posted - Apr 01 2005 : 10:27:22 AM
|
| You may also want to post to the SPM mailing lists asking them to add the code into SPM. |
 |
|
|
charles.michelich
BIAC Alum
   
USA
183 Posts |
Posted - Apr 02 2005 : 10:51:12 PM
|
Evan,
I think that I found a way to make the "ensure backward compatibility support" option work. It appears that the actual save function in MATLAB does not use the correct preferences file even though the preferences GUI uses the correct file. If you set the preference and then copy your preferences file to the "default" location, the .mat compatibility preference appears to work. Here are instructions:
1. Launch MATLAB.
2. Set the "Ensure backward compatibility (-v6)" flag in the "General:MAT-Files" section of the preferences.
3. Quit MATLAB.
4. Create the following folder if it does not already exist (where USERNAME is your BIAC username) C:\Documents and Settings\USERNAME\Application Data\MathWorks\MATLAB\R14
5. Copy matlab.prf from U:\Profile\Application Data\MathWorks\MATLAB\R14 to C:\Documents and Settings\USERNAME\Application Data\MathWorks\MATLAB\R14
Please post to this thread if this fix works for you.
Enjoy, Chuck
|
 |
|
|
evan.gordon
BIAC Alum

12 Posts |
Posted - Apr 04 2005 : 09:38:00 AM
|
Chuck,
Brent tried this fix and said that it worked great. However, for me the file U:\Profile\Application Data\MathWorks does not exist. In the Profile\Application Data\ file, I only have \Microsoft and \Identities. Do you know why this is?
Evan |
 |
|
|
charles.michelich
BIAC Alum
   
USA
183 Posts |
Posted - Apr 04 2005 : 09:51:23 AM
|
Hi Evan,
I suggest that you talk to Francis. It sounds like your profile directories are not redirected properly.
Chuck |
 |
|
| |
Topic  |
|