The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Why Matlab "find" operation is not reversible?
Replies: 3   Last Post: Apr 7, 2000 8:34 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jacob Nikom

Posts: 8
Registered: 12/7/04
Why Matlab "find" operation is not reversible?
Posted: Apr 6, 2000 4:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

I am trying to understand why Matlab "find"
operation is not reversible.

I have simple matrix:

a = [0 0 1 0
0 1 0 0
0 0 0 1
0 0 1 0];

I found its non-zero indexes
(indexes of non-zero elements):
[ii,jj] = find(a);

Now I recreate the matrix a:
b = zeros(4);
b(ii,jj) = 1

b =

0 1 1 1
0 1 1 1
0 1 1 1
0 1 1 1

I got a wrong answer which means find operation
is not reversible.

Is it a bug, feature or I am wrong somewhere?

Jacob Nikom





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.