Hi, How do I access the individual elements of a QuantityArray? For example, if I initialize an array:
temps=QuantityArray[ConstantArray[0,5],"Kelvins"]
and then I'd like to change the third element of temps to 273 K.
Thanks, Tony
Thanks Henrik! That's perfect.
I guess you are asking for ReplacePart, e.g. try:
ReplacePart
temps = QuantityArray[ConstantArray[0, 5], "Kelvins"]; temps = ReplacePart[temps, 3 -> Quantity[273, "Kelvins"]]; temps[[3]]