How can I keep two indices preserved in MATLAB ?

Hi All,
This is a snapshot of the table that I am working on.
I need the indices of the [row] and [column] BOTH columns of the table to be preserved when I move on to the next iteration.
Simply, for B = 0.0891 I should be able to tell that row = 1 and column = 2, once after I move on to the next iteration, but the position of that element in the next iteration migh not be at the first place as in this case.
I hope you got my question.
Thank you.
This is the table that I am discussing about.....
Probelm_mATLAB_questions.JPG

7 Commenti

I do not understand. But if you need to, you could add another variable to the table that was the original row number inside the table. Then if you end up re-arranging the rows of the table, you would still be able to tell which row an entry was originally.
Thanks Walter for your prompt reply,
I can manage preserving the row number, but the problem is I need to preserve both row number and the column number.
You have any suggestion for that ?
What column number are you trying to preserve? Are you trying to preserve the value of the variable named 'column' (variable #5)? If so then just keep the column.
Hi Walter,
What I actually want is to keep the (row, column) set preserved for each and every entry even the position of the entries change in a later iteration.
Thanks.
To preserve it don't disturb the value ..simple..
ismember the moved data against the original data and take the second output to get the linear index in the original data.
Okay I will try.
Anyway thanks for the support.

Risposte (0)

Questa domanda è chiusa.

Prodotti

Release

R2019a

Richiesto:

il 13 Nov 2019

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by