[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loading .mat file question
From: |
Peter Cloetens |
Subject: |
Re: Loading .mat file question |
Date: |
Tue, 8 Aug 2006 12:39:57 +0200 |
User-agent: |
Internet Messaging Program (IMP) 3.2.1 |
Hi,
For converting *.mat files from version 7 into verson 6 readable by octave, I
wrote the following small function. To be run with Matlab 7.x (for the last
time). The original file is copied on linux/unix.
Peter
function [] = convert_v7v6(matlabfile)
if exist(matlabfile,'file')
if isunix
command = sprintf('cp %s %s.v7',matlabfile,matlabfile);
disp(command)
unix(command);
end
S=load(matlabfile);
comm = sprintf('save %s -v6 -struct S',matlabfile);
disp(comm)
eval(comm);
disp(sprintf('%s converted to matlab version 6',matlabfile))
end
Quoting frank wang <address@hidden>:
> Hi,
>
> As a new user, I am transfering my work to octave from matlab. I have
> encountered problems to load .mat files. It seems that octave cannot load
> mat file created by matlab version 7.x. Also, does octave load matlab class
> object? since I have a mat file contain one class object and when I try to
> load it, octave complains invalid dimensions array subelemnt. But when I
> type help class in octave, it does have the class command.
>
> Also, are there Octave running in X window? I complied and installed the
> newest version and it is command window only.
>
> Thanks
>
> Frank
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/