Or if you are open to Python, you may take some try too, like below.
import originpro as op
import numpy as np
mb=op.find_book('m')
ms=mb[0] #assume it is a 5*5 dimension obj
arr = ms.to_np2d(0)
row1 = arr[0] #1st row
col3 = arr[:,2] #3rd col
row1=row1+100
col3=col3-200
arr[0]=row1
arr[:,2]=col3
ms2=op.new_sheet('m')
ms2.shape=5,5 #set same size as source mat object
ms2.from_np2d(arr)
AKazak
Posted - 11/25/2025 : 08:58:06 AM
quote:Originally posted by minimax
Hi Andrey,
following script with cell() function should also work.
And it is recommended to define range to access.
range rmat1=[Mbook1]Msheet2!2;
rmat1!cell(2,3)=4;
Got it. How do I refer to individual rows and columns of a matrix object?
--- Andrey
AKazak
Posted - 11/25/2025 : 08:47:01 AM
quote:Originally posted by aplotnikov
quote:Originally posted by AKazak https://www.originlab.com/pdfs/5_matrix.pdf does not mention matrix object and implicitly assumes a matrix with a single matrix object in it.
It is not true. You can use Mat(n)-notation to access n-th matrix object:
following script with cell() function should also work.
And it is recommended to define range to access.
range rmat1=[Mbook1]Msheet2!2;
rmat1!cell(2,3)=4;
aplotnikov
Posted - 11/24/2025 : 8:09:12 PM
quote:Originally posted by AKazak https://www.originlab.com/pdfs/5_matrix.pdf does not mention matrix object and implicitly assumes a matrix with a single matrix object in it.
It is not true. You can use Mat(n)-notation to access n-th matrix object: