Got Questions? Get Answers.
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:
storing a deleted matrix

Subject: storing a deleted matrix

From: Aparna Sampath

Date: 23 Sep, 2010 09:47:03

Message: 1 of 6

Hi

I want to perform this operation. I have a set of 5 sub matrices each matrix carrying a label as 1,2,3,4,5. I want to take one matrix as test and concatenate the other 4 matrices as training. In each loop, the test set changes. for this, I am trying to delete the matrix with label 1 and concatenate the matrices with label 2,3,4,5. But I am unable to store the deleted matrix which is also needed for the calculation.

Is thr any other way or how do i store a deleted sub matrix??

Subject: storing a deleted matrix

From: Oleg Komarov

Date: 23 Sep, 2010 10:03:04

Message: 2 of 6

"Aparna Sampath" <aparna.sampath26@gmail.com> wrote in message <i7f7mn$e4b$1@fred.mathworks.com>...
> Hi
>
> I want to perform this operation. I have a set of 5 sub matrices each matrix carrying a label as 1,2,3,4,5. I want to take one matrix as test and concatenate the other 4 matrices as training. In each loop, the test set changes. for this, I am trying to delete the matrix with label 1 and concatenate the matrices with label 2,3,4,5. But I am unable to store the deleted matrix which is also needed for the calculation.
>
> Is thr any other way or how do i store a deleted sub matrix??

Why do you want to delete it?
Are you short on memory?

Also what do you mean label 1?
Is it a label_1 = m by n matrix?

Oleg

Subject: storing a deleted matrix

From: Aparna Sampath

Date: 23 Sep, 2010 11:31:04

Message: 3 of 6

I am trying to use the 5 submatrices in a loop, such that when i= 1:5, at each iteration, 1 submatrix is taken separately and the other 4 are concatenated to use in KNNclassify() in matlab. For this I am trying options like givin labels at the end column, 1 for first 11 rows, 2 for next 11 rows, until label 5. And then divide the matrix based on these labels for using in the above method.




"Oleg Komarov" <oleg.komarovRemove.this@hotmail.it> wrote in message <i7f8ko$e7s$1@fred.mathworks.com>...
> "Aparna Sampath" <aparna.sampath26@gmail.com> wrote in message <i7f7mn$e4b$1@fred.mathworks.com>...
> > Hi
> >
> > I want to perform this operation. I have a set of 5 sub matrices each matrix carrying a label as 1,2,3,4,5. I want to take one matrix as test and concatenate the other 4 matrices as training. In each loop, the test set changes. for this, I am trying to delete the matrix with label 1 and concatenate the matrices with label 2,3,4,5. But I am unable to store the deleted matrix which is also needed for the calculation.
> >
> > Is thr any other way or how do i store a deleted sub matrix??
>
> Why do you want to delete it?
> Are you short on memory?
>
> Also what do you mean label 1?
> Is it a label_1 = m by n matrix?
>
> Oleg

Subject: storing a deleted matrix

From: Oleg Komarov

Date: 23 Sep, 2010 11:43:06

Message: 4 of 6

Unfortunately I don't understand your point.

Oleg

Subject: storing a deleted matrix

From: Mark Shore

Date: 23 Sep, 2010 11:57:04

Message: 5 of 6

> Is thr any other way or how do i store a deleted sub matrix??

Don't delete it?

Subject: storing a deleted matrix

From: Robert Cumming

Date: 23 Sep, 2010 13:43:07

Message: 6 of 6

"Aparna Sampath" <aparna.sampath26@gmail.com> wrote in message <i7f7mn$e4b$1@fred.mathworks.com>...
> Hi
>
> I want to perform this operation. I have a set of 5 sub matrices each matrix carrying a label as 1,2,3,4,5. I want to take one matrix as test and concatenate the other 4 matrices as training. In each loop, the test set changes. for this, I am trying to delete the matrix with label 1 and concatenate the matrices with label 2,3,4,5. But I am unable to store the deleted matrix which is also needed for the calculation.
>
> Is thr any other way or how do i store a deleted sub matrix??

I dont really follow the OP, but here goes...

Can you not create temporary copies in your loop which change each loop, that way the originals stay the same, the temporary (test) copy is dynamic.

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