The `math/matrix` library aims at functional arrays, that is arrays
that aren't mutated but are instead transformed into new arrays.
However, if you want mutable arrays, then you should probably use the
`mutable-array` constructor to create them, and then `array-set!` will
work.
Sam
On Sun, Oct 7
>
> >I think you want the `matrix-ref` function.
>
While this does give me the value, I am unable to set it.
Calling
(define M (matrix ([1 2 3] [4 5 6])))
(set! (matrix-ref M 0 2) 5)
Leads to the error:
; .../Example.rkt:228:6: set!: not an identifier
-
And array-set! for cha
And array-set! for changing the value of an entry.
/Jens Axel
Den søn. 7. okt. 2018 kl. 16.46 skrev Sam Tobin-Hochstadt <
sa...@cs.indiana.edu>:
> I think you want the `matrix-ref` function.
>
> Sam
> On Sun, Oct 7, 2018 at 12:30 AM Ricardo Iglesias
> wrote:
> >
> > Sorry for the confusing wor
I think you want the `matrix-ref` function.
Sam
On Sun, Oct 7, 2018 at 12:30 AM Ricardo Iglesias
wrote:
>
> Sorry for the confusing wording.
> Basically, All I want is to be able to do
> G[ row ][ col ] = value
>
> In Racket. I've been messing with Racket this afternoon and have an engine
> that
Sorry for the confusing wording.
Basically, All I want is to be able to do
G[ row ][ col ] = value
In Racket. I've been messing with Racket this afternoon and have an engine
that is able to index into matrices, and just implemented several common
matrix operations, such as transpose, matrix mu
Ricardo Iglesias writes:
> Good afternoon. I'm trying to move away from things like Matlab and SciPy
> to do linear algebra work.
> Something I notice I do a lot is indexing operations, such as
> MATRIX[ row ] [ column ]
>
> I'm looking at the "math/matrix" library provided here:
> https://doc
Good afternoon. I'm trying to move away from things like Matlab and SciPy
to do linear algebra work.
Something I notice I do a lot is indexing operations, such as
MATRIX[ row ] [ column ]
I'm looking at the "math/matrix" library provided here:
https://docs.racket-lang.org/math/matrices.html, a
7 matches
Mail list logo