Thread Subject: Help in Using Matlab for PCA

Subject: Help in Using Matlab for PCA

From: phalgun pandya

Date: 15 Apr, 2011 11:17:48

Message: 1 of 6

Hey i just want to create a file like the one provided by Matlab named
'cities.mat'.
Actually i am working on PCA with one of my friend and want to create
a file same as the example file.
But as i cannot see the code inside that file.
 Please Help.

Subject: Help in Using Matlab for PCA

From: Wayne King

Date: 15 Apr, 2011 11:30:06

Message: 2 of 6

phalgun pandya <montyjust4.u@gmail.com> wrote in message <56ca92d5-ebc7-4c0f-95df-2217f950300a@z27g2000prz.googlegroups.com>...
> Hey i just want to create a file like the one provided by Matlab named
> 'cities.mat'.
> Actually i am working on PCA with one of my friend and want to create
> a file same as the example file.
> But as i cannot see the code inside that file.
> Please Help.

Hi, What do you mean the code inside of the .mat file? You can create a .mat file with the variables you wish by using the save command.

Wayne

Subject: Help in Using Matlab for PCA

From: Barry Williams

Date: 15 Apr, 2011 11:33:04

Message: 3 of 6

phalgun pandya <montyjust4.u@gmail.com> wrote in message <56ca92d5-ebc7-4c0f-95df-2217f950300a@z27g2000prz.googlegroups.com>...
> Hey i just want to create a file like the one provided by Matlab named
> 'cities.mat'.
> Actually i am working on PCA with one of my friend and want to create
> a file same as the example file.
> But as i cannot see the code inside that file.
> Please Help.

What do you mean that you 'cannot see the code'? Are you referring to the variables stored in th cities.mat file? Are you opening the cities.mat? It's a tutorial example and can be found in the statistics toolbox.

Subject: Help in Using Matlab for PCA

From: Yumnam Kirani

Date: 15 Apr, 2011 11:38:04

Message: 4 of 6

phalgun pandya <montyjust4.u@gmail.com> wrote in message <56ca92d5-ebc7-4c0f-95df-2217f950300a@z27g2000prz.googlegroups.com>...
> Hey i just want to create a file like the one provided by Matlab named
> 'cities.mat'.
> Actually i am working on PCA with one of my friend and want to create
> a file same as the example file.
> But as i cannot see the code inside that file.
> Please Help.

 There is no code in the cities.mat. It has only three variables. Two of them are character array and the third is a numeric array. What code do you want to see?

Yumnam Kirani Singh
Tronglaobi Awang Leikai

Subject: Help in Using Matlab for PCA

From: phalgun pandya

Date: 17 Apr, 2011 10:24:26

Message: 5 of 6

On Apr 15, 4:38 pm, "Yumnam Kirani" <kirani.si...@gmail.com> wrote:
> phalgun pandya <montyjust...@gmail.com> wrote in message <56ca92d5-ebc7-4c0f-95df-2217f9503...@z27g2000prz.googlegroups.com>...
> > Hey i just want to create a file like the one provided by Matlab named
> > 'cities.mat'.
> > Actually i am working on PCA with one of my friend and want to create
> > a file same as the example file.
> > But as i cannot see the code inside that file.
> >  Please Help.
>
>  There is no code in the cities.mat. It has only three variables. Two of them are character array and the third is a numeric array. What code do you want to see?
>
> Yumnam Kirani Singh
> Tronglaobi Awang Leikai

I thought all the variables which the 'cities.mat' show have been
created by an M-file, thats why asked this question.
It might have been a silly one.

Subject: Help in Using Matlab for PCA

From: Barry Williams

Date: 18 Apr, 2011 16:02:04

Message: 6 of 6

phalgun pandya <montyjust4.u@gmail.com> wrote in message <2fbc598b-8c3a-4b39-840c-5f752e993190@m23g2000prl.googlegroups.com>...
> On Apr 15, 4:38 pm, "Yumnam Kirani" <kirani.si...@gmail.com> wrote:
> > phalgun pandya <montyjust...@gmail.com> wrote in message <56ca92d5-ebc7-4c0f-95df-2217f9503...@z27g2000prz.googlegroups.com>...
> > > Hey i just want to create a file like the one provided by Matlab named
> > > 'cities.mat'.
> > > Actually i am working on PCA with one of my friend and want to create
> > > a file same as the example file.
> > > But as i cannot see the code inside that file.
> > >  Please Help.
> >
> >  There is no code in the cities.mat. It has only three variables. Two of them are character array and the third is a numeric array. What code do you want to see?
> >
> > Yumnam Kirani Singh
> > Tronglaobi Awang Leikai
>
> I thought all the variables which the 'cities.mat' show have been
> created by an M-file, thats why asked this question.
> It might have been a silly one.

No, the cities.mat contains the raw data to be processed using the statistics functions. It's used as a tutorial for PCA analysis. You can get an explanation by searching princomp in the help and following the link for Example: Principle Component Analysis. (At least that's how it works in my version of the software.)

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com