[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
manipulation of matrix elements
From: |
Michael Roth |
Subject: |
manipulation of matrix elements |
Date: |
Thu, 16 Dec 1999 17:07:54 +0100 |
I tried to set a lower limit for matrix elements using the find command.
I think there is a bug. Have a look at the following lines:
s=rand(2)
s =
0.47926 0.89733
0.77293 0.02806
>> [i,j]=find(s<=0.5)
i =
1
2
j =
1
2
>> s(i,j)=0.5 | In Matlab, this command gives
s = | s =
0.50000 0.50000 | 0.50000 0.89733
0.50000 0.50000 | 0.77293 0.50000
What can I do to get the right result?
Thanks for any comment.
Mike
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------
- manipulation of matrix elements,
Michael Roth <=