Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to save the .raw file as .mat format?

Subject: how to save the .raw file as .mat format?

From: alison

Date: 19 Jun, 2010 18:20:05

Message: 1 of 5

Hi all,

pls suggest me how to save the .raw file as a .mat format. i need to analyze the signal file in the 'wavemenu'. i need to change my .raw file to .mat format to analyze.
i've already tried with 2 ways:
1)- Create new variable in the workspace
   - Import data from my file (.raw) then appear Import Wizard Window
     i) some file appear FileInterpretError
     ii) some file can import and it only create the string and it's value is 2x1 cell. Then open that file and save as the 'name.mat' format in the variable editor.
  - Load in the wavemenu tool box by choosing File>Load>Signal>name.mat
  - Appear the Load Signal ERROR window with 'File name.mat doesn't contain one dimensional Signal' message.

2) - Open the .raw file in the Editor then save name.mat
    - Load the signal from the wavelet toolbox.
    - Error window appears with 'name.mat is not valid' message.

Anyone who knows how to save .mat format from .raw format please help me.

Thanks in advance.
Alison.


  

Subject: how to save the .raw file as .mat format?

From: Walter Roberson

Date: 19 Jun, 2010 22:56:39

Message: 2 of 5

alison wrote:

> pls suggest me how to save the .raw file as a .mat format.

First you have to find out the file format of the .raw file, which you
do not appear to know yet based upon your description. There is no one
file format for .raw files: the name means that the file is in a raw
internal format of the program or device that created the file, and that
the file is not expected to be readable by any other program.

Subject: how to save the .raw file as .mat format?

From: alison

Date: 21 Jun, 2010 06:42:05

Message: 3 of 5

Walter Roberson <roberson@hushmail.com> wrote in message <OWbTn.63968$h57.48501@newsfe22.iad>...
> alison wrote:
>
> > pls suggest me how to save the .raw file as a .mat format.
>
> First you have to find out the file format of the .raw file, which you
> do not appear to know yet based upon your description. There is no one
> file format for .raw files: the name means that the file is in a raw
> internal format of the program or device that created the file, and that
> the file is not expected to be readable by any other program.

hello Walter,

Thanks a lot for your response to my message. .raw file can be loaded in the matlab program and

filelist = ls(['name*.raw']);
allpressure =[];
fs = 2000;
for ii= 1:100;
    prid = fopen(char(filelist(ii,:)));
    pressure = fread(prid, inf, 'int16');
    fclose(prid);
    allpressure = [allpressure; pressure];
end
t = linspace(0,length(allpressure)/fs,length(allpressure));
figure;
plot (t,allpressure);
xlabel('time (sec)');
ylabel ('amplitude (amp)');

Then I can see clearly my wavelets that i want to detect. but now i want to use 1D-wavelet tool (wavemenu). so it must be changed to .mat.

Subject: how to save the .raw file as .mat format?

From: Wayne King

Date: 21 Jun, 2010 10:00:25

Message: 4 of 5

"alison " <ayem0013@e.ntu.edu.sg> wrote in message <hvn1jt$3n6$1@fred.mathworks.com>...
> Walter Roberson <roberson@hushmail.com> wrote in message <OWbTn.63968$h57.48501@newsfe22.iad>...
> > alison wrote:
> >
> > > pls suggest me how to save the .raw file as a .mat format.
> >
> > First you have to find out the file format of the .raw file, which you
> > do not appear to know yet based upon your description. There is no one
> > file format for .raw files: the name means that the file is in a raw
> > internal format of the program or device that created the file, and that
> > the file is not expected to be readable by any other program.
>
> hello Walter,
>
> Thanks a lot for your response to my message. .raw file can be loaded in the matlab program and
>
> filelist = ls(['name*.raw']);
> allpressure =[];
> fs = 2000;
> for ii= 1:100;
> prid = fopen(char(filelist(ii,:)));
> pressure = fread(prid, inf, 'int16');
> fclose(prid);
> allpressure = [allpressure; pressure];
> end
> t = linspace(0,length(allpressure)/fs,length(allpressure));
> figure;
> plot (t,allpressure);
> xlabel('time (sec)');
> ylabel ('amplitude (amp)');
>
> Then I can see clearly my wavelets that i want to detect. but now i want to use 1D-wavelet tool (wavemenu). so it must be changed to .mat.

Hi,

If the data is in the Matlab workspace, you can import it directly into the Wavelet GUI--wavemenu. Just choose "Import from Workspace" under file. You will see your data-- allpressure

If you still want to save it as a .mat file, then please read the documentation for save()

>>doc save

Wayne

Subject: how to save the .raw file as .mat format?

From: alison

Date: 21 Jun, 2010 16:19:05

Message: 5 of 5

"Wayne King" <wmkingty@gmail.com> wrote in message <hvnd7p$bjl$1@fred.mathworks.com>...
> "alison " <ayem0013@e.ntu.edu.sg> wrote in message <hvn1jt$3n6$1@fred.mathworks.com>...
> > Walter Roberson <roberson@hushmail.com> wrote in message <OWbTn.63968$h57.48501@newsfe22.iad>...
> > > alison wrote:
> > >
> > > > pls suggest me how to save the .raw file as a .mat format.
> > >
> > > First you have to find out the file format of the .raw file, which you
> > > do not appear to know yet based upon your description. There is no one
> > > file format for .raw files: the name means that the file is in a raw
> > > internal format of the program or device that created the file, and that
> > > the file is not expected to be readable by any other program.
> >
> > hello Walter,
> >
> > Thanks a lot for your response to my message. .raw file can be loaded in the matlab program and
> >
> > filelist = ls(['name*.raw']);
> > allpressure =[];
> > fs = 2000;
> > for ii= 1:100;
> > prid = fopen(char(filelist(ii,:)));
> > pressure = fread(prid, inf, 'int16');
> > fclose(prid);
> > allpressure = [allpressure; pressure];
> > end
> > t = linspace(0,length(allpressure)/fs,length(allpressure));
> > figure;
> > plot (t,allpressure);
> > xlabel('time (sec)');
> > ylabel ('amplitude (amp)');
> >
> > Then I can see clearly my wavelets that i want to detect. but now i want to use 1D-wavelet tool (wavemenu). so it must be changed to .mat.
>
> Hi,
>
> If the data is in the Matlab workspace, you can import it directly into the Wavelet GUI--wavemenu. Just choose "Import from Workspace" under file. You will see your data-- allpressure
>
> If you still want to save it as a .mat file, then please read the documentation for save()
>
> >>doc save
>
> Wayne

Hello Wayne,
Really thanks a lot for your advice. But my data is not in the workspace and they are under in the MATLAB\R2009a\work\MYDATA\.... I create the new variable in the workspace and choose the import data to import my .raw data into workspace.
Then it can only string and cannot import as 1-D signal.
I am a very first time user for Matlab and I don't know about matlab tools so much. thanks a lot for your helping.

alison.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us