Thread Subject: open a file

Subject: open a file

From: Theo Kalfas

Date: 10 Feb, 2009 13:08:02

Message: 1 of 3

Hi,
I have a file result.mat which is in the folder work and it has 3 matrix.I want to open this file in my m-file which i have to read these matrix.How can i do that?With the fopen?
Thank you.

Subject: open a file

From: David

Date: 10 Feb, 2009 13:14:01

Message: 2 of 3

"Theo Kalfas" <k_thodoros@yahoo.gr> wrote in message <gmru7i$on0$1@fred.mathworks.com>...
> Hi,
> I have a file result.mat which is in the folder work and it has 3 matrix.I want to open this file in my m-file which i have to read these matrix.How can i do that?With the fopen?
> Thank you.

if its a .mat file created with the 'save' function, you get back the data with the 'load' command.

Subject: open a file

From: vedenev

Date: 10 Feb, 2009 14:12:56

Message: 3 of 3

Use load in format:
S=load('result.mat');

Then S will be structure with your data. If result.mat has matricies A
and B then you can get it as S.A and S.B

-----------------------------------------
Maxim Vedenev, MATLAB Custom Programming
vedenev@ngs.ru
http://simulations.narod.ru/

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
save David 10 Feb, 2009 08:15:07
load David 10 Feb, 2009 08:15:07
rssFeed for this Thread

Contact us at files@mathworks.com