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
 All Forums
 Origin Forum
 Origin Forum
 converting text to complex numbers

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
marek_888 Posted - 07/26/2017 : 1:37:51 PM
Origin Ver. and Service Release (Select Help-->About Origin): 2016
Operating System: Windows10
I imported ASCII file which contained columns of complex numbers. Origin sees them as text. Changing Column properties to Numeric/COmplex results in "--" output. How can I either convert the columns to complex numerical values or importin such a way that Origin recognizes the data as complex numbers.

Marek
3   L A T E S T    R E P L I E S    (Newest First)
arstern Posted - 07/28/2017 : 11:22:07 AM
Hi,

I believe you will need to set the worksheet columns to complex numbers before importing the data. If you import the data into the worksheet and then set the column to complex, you will get --.

The format is also important:

"a + bi" will work
"a+bi" will give you something different.

Hope this helps,
Aviel
OriginLab

marek_888 Posted - 07/26/2017 : 6:00:56 PM
Hi Yiming

Thank you for your response. Unfortunately your method does not work for me. Since I do not know Origin scripting language it is hard to comment on why it is the case. I thought that The line which is looking for "-" is causing a problem since my data includes numbers with negative exponents (like 1.2e-006). Removing that line does not fix the problem however.
But I managed to separate my data on import into real and imaginary parts by defining appropriate delimiters. Luckily my data is always of the form "a+bi" and never "a-bi".

Marek
YimingChen Posted - 07/26/2017 : 5:14:45 PM
Hi Marek,

Assume you have complex numbers stored in col(A) with string format “a + bi”, double click the column header of col(B) to launch the column property dialog. Under the Options node, change Format to Numeric, change Data Type to Complex(16). Then setting column value of col(B) to col(A) will gives complex numbers.

Hope this answers your question.

Thanks,
Yiming

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000