>
> >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 changing the value of an entry.
What would be the syntax for that? I noticed that a requirement for using 
array-set! is that the array passed in needs to be a settable array, and 
that the matrices in math/matrix are not such a type of array. 

I get this error: 
 array-set!: contract violation
;   expected: Settable-Array?
;   given: (array #[#[1 2 3]])
;   in: the 1st argument of
;       (->
;        (struct/c
;         Settable-Array
;         (vectorof Index)



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to