The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 2022SR1: w2m origin shift
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 04/12/2022 :  07:32:04 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2022 (64-bit) SR1 9.9.0.225
Windows 7 Pro SP1 x64

Greetings!

I use w2m with the following settings:


It has a "X Values in First Column" tick.

Is there a way to set a specific (not the 1st) X column for X values.

In other words: can I shift the coordinates origin for w2m?


---
Andrey

Shirley_GZ

China
Posts

Posted - 04/12/2022 :  11:31:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

How about inserting a new column with your X values before the first column of the sheet? And then, you can specify this new first column as X values in w2m dialog to convert the worksheet to matrix.

Thanks,
Shirley

Originlab Technical Service Team
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 04/13/2022 :  01:57:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Shirley_GZ

Hi Andrey,

How about inserting a new column with your X values before the first column of the sheet? And then, you can specify this new first column as X values in w2m dialog to convert the worksheet to matrix.

Thanks,
Shirley

Originlab Technical Service Team



Thank you for a good suggestion.
However this requires the additional worksheet data manipulation step.

Does it make sense to improve w2m by adding a option to specify X/Y column/row explicitly?

---
Andrey
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 04/13/2022 :  04:28:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Like we provide an edit box, where you can put

x = x - 5

Will that work?

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 04/13/2022 :  07:14:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

Like we provide an edit box, where you can put

x = x - 5

Will that work?

CP




Didn't get the idea.
Maybe provide an option to specify row/column indices by hand?

---
Andrey
Go to Top of Page

snowli

USA
1426 Posts

Posted - 04/13/2022 :  09:43:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This tool converts whole worksheet to matrix, not a selected range.
See the input is whole sheet. So unless we change design to support input as a selected region, i don't think this will work.

E.g. if u specify e.g. 3rd column as X, do we need to treat column 1 & 2 as Z value or ignore it?

Could you let us know what you want to do after converting to matrix, since if u want to do plotting, u can select region to plot 3d and controur, etc. and it will show plotvm where u can specify where x and y are and where z is.

Thanks, Snow

Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 04/13/2022 :  11:50:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

This tool converts whole worksheet to matrix, not a selected range.
See the input is whole sheet. So unless we change design to support input as a selected region, i don't think this will work.

E.g. if u specify e.g. 3rd column as X, do we need to treat column 1 & 2 as Z value or ignore it?

Could you let us know what you want to do after converting to matrix, since if u want to do plotting, u can select region to plot 3d and controur, etc. and it will show plotvm where u can specify where x and y are and where z is.

Thanks, Snow




If I specify the 3rd column as X, then I want Origin to ignore columns 1 & 2.

After converting to matrix I do some processing and then do contour and image plotting the results.

---
Andrey
Go to Top of Page

snowli

USA
1426 Posts

Posted - 04/13/2022 :  1:42:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

I jiraed this in ORG-25068 S1 to support convert a range of data to matrix. Since we are close to 2022b release, i set it to next version.

For now, since it can only convert whole worksheet to matrix. You may need to copy those data u want to convert to another worksheet or use Copy Columns to feature so if source worksheet changes, things will auto update.

Or let us know what kind of processing you are doing after converting to matrix so we can see if it's doable in worksheet so no need to convert to matrix.

Thanks, Snow

Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 04/13/2022 :  10:07:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,
For now, since it can only convert whole worksheet to matrix. You may need to copy those data u want to convert to another worksheet or use Copy Columns to feature so if source worksheet changes, things will auto update.



Using Copy Columns seems to be a promising way in my case.
Also, is there an option to skip few rows from the top while copying columns to a new worksheet?

---
Andrey
Go to Top of Page

minimax

357 Posts

Posted - 04/14/2022 :  01:33:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AKazak,

No, "Copy Columns to" supports full column only.

You may try annother XF wrcopy instead:
https://www.originlab.com/doc/X-Function/ref/wrcopy?f=dl

And "what kind of processing you are doing after converting to matrix" is?
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 04/14/2022 :  03:09:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Does it have GUI dialog?


I guess you mean menu access instead?

"wrcopy -d;" will open a dialog, but it does not have menu entry.
Go to Top of Page

minimax

357 Posts

Posted - 04/14/2022 :  04:45:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi AKazak,

Sorry. I somehow made a mistake and remove(modify) your reply...

You may change back.

Sorry again.
Go to Top of Page

snowli

USA
1426 Posts

Posted - 12/12/2023 :  10:47:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

Good news.
We improved the xfunction r2m in Origin 2024 to support convert a subregion of worksheet with XY info. to matrix.




Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 12/12/2023 :  11:57:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Snow,

Great improvement.
I will test it and report back.

---
Andrey
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000