T O P I C R E V I E W |
AKazak |
Posted - 07/03/2021 : 08:08:31 AM OriginPro 2021b (64-bit) SR2 9.8.5.212 Windows 10 21H1 x64
Greetings!
I want to rescale matrix Z values to a range [a,b]. As far as I understood, I should use Set Matrix Values... command. Is there a LT or OC function to remap [zmin,zmax] to [a,b]?
Thank you.
--- Andrey |
7 L A T E S T R E P L I E S (Newest First) |
cpyang |
Posted - 07/05/2021 : 11:59:05 AM Status bar stats was in our plan for 2022, ORG-23121
CP
|
AKazak |
Posted - 07/05/2021 : 06:02:37 AM quote: Originally posted by AmandaLu
Hi,
Yes, you can use the syntax.
quote: Originally posted by AKazak
Is it OK to use the following syntax?
Zomax=max(mat(1));Zomin=min(mat(1));
Matrix doesn’t support status bar yet.
quote: Originally posted by AKazak
Side question: why does the status bar doesn't show the statistics of the matrix selection (cells, rows, columns)? Also, Copy Statistics command also returns nothing?
BTW, I just found we have a sample of normalizing matrix. You can modify the code as needed.

Thanks, Amanda OriginLab Technical Service
Got it, thanks! Please add my vote for the Status Bar Statistics, while working with matrices.
--- Andrey |
AmandaLu |
Posted - 07/05/2021 : 05:06:36 AM Hi,
Yes, you can use the syntax.
quote: Originally posted by AKazak
Is it OK to use the following syntax?
Zomax=max(mat(1));Zomin=min(mat(1));
Matrix doesn’t support status bar yet.
quote: Originally posted by AKazak
Side question: why does the status bar doesn't show the statistics of the matrix selection (cells, rows, columns)? Also, Copy Statistics command also returns nothing?
BTW, I just found we have a sample of normalizing matrix. You can modify the code as needed.

Thanks, Amanda OriginLab Technical Service
|
AKazak |
Posted - 07/05/2021 : 04:40:45 AM quote: Originally posted by AmandaLu
yes
OK.
Is it OK to use the following syntax?
Zomax=max(mat(1));Zomin=min(mat(1));
Side question: why does the status bar doesn't show the statistics of the matrix selection (cells, rows, columns)? Also, Copy Statistics command also returns nothing?
--- Andrey |
AmandaLu |
Posted - 07/05/2021 : 04:12:27 AM yes
quote: Originally posted by AKazak
quote: Originally posted by AmandaLu
Hi,
Set Matrix Values is simpler way to rescale Z values. You can use msetvalue
https://www.originlab.com/doc/X-Function/ref/msetvalue
Thanks, Amanda OriginLab Technical Service
Do you mean doing something like this?
msetvalue im:=[MBook1]MSheet1!1 formula:="(Cell(i,j)-Zomin)/(Zomax-Zomin)*(Ztmax-Ztmin)+Ztmin" script:="Zomax=max(mat(1));Zomin=min(mat(1));Ztmax=10;Ztmin=20;"
--- Andrey
|
AKazak |
Posted - 07/05/2021 : 03:11:09 AM quote: Originally posted by AmandaLu
Hi,
Set Matrix Values is simpler way to rescale Z values. You can use msetvalue
https://www.originlab.com/doc/X-Function/ref/msetvalue
Thanks, Amanda OriginLab Technical Service
Do you mean doing something like this?
msetvalue im:=[MBook1]MSheet1!1 formula:="(Cell(i,j)-Zomin)/(Zomax-Zomin)*(Ztmax-Ztmin)+Ztmin" script:="Zomax=max(mat(1));Zomin=min(mat(1));Ztmax=10;Ztmin=20;"
--- Andrey |
AmandaLu |
Posted - 07/04/2021 : 11:40:51 PM Hi,
Set Matrix Values is simpler way to rescale Z values. You can use msetvalue
https://www.originlab.com/doc/X-Function/ref/msetvalue
Thanks, Amanda OriginLab Technical Service
|
|
|