[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: manipulation of matrix elements

**From**: |
Mark Hagger |

**Subject**: |
Re: manipulation of matrix elements |

**Date**: |
Thu, 16 Dec 1999 16:10:48 +0000 |

On Thu, 16 Dec 1999, Michael Roth wrote:
>* 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(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*
As it happens Scilab gives the same answer as octave. I suppose it is a
question of what one might mean by s(i,j), all combinations of "i" and "j" or
specifically the list of i,j values. I have to admit that I had always assumed
that it would use the list version, but clearly not!
The only alternative (as far as I know) would be to reshape s to a vector, find
the relevant values of s in this form, then reshape back to the matrix.
Mark
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------