| Alexa33000 |
Posted - 11/12/2025 : 1:20:01 PM Origin Ver. and Service Release (Select Help-->About Origin):10.1.0.170 Operating System: Windows
Hi, I am trying to interlace 2 matrices (1 column of matrix A, 1 column of matrix B, then 1 column of matrix A again, and so on.)
I am new to Python and not used to programming for Origin.
I have tried : in Set values / Python function :
>>>>>>>>> import OriginPro as op
def intensitephase(y,i,j):
""" F:ii """
for i in range(1,257): for j in range(1,514): if round(j/2)==j/2 : y=op.MBook4!cell(i,j/2) else: y=op.MBook1!cell(i,(j+1)/2) return y
>>>>>
But that crashes, with a syntax error message. It appears that I cannot call MBook4!cell(i,j/2) to get the value of a given cell.
How do I extract the value of a cell at row i, column j ?
Thank you
Alex'a. |