It seems like you have a bunch of null characters in the string for some
reason. You could try stripping them out with replace:
julia> x = "\x002\0.\x005\0"
"\x002\0.\x005\0"
julia> y = replace(x,"\0","")
"2.5"
julia> parse(Float64, y)
2.5
On Tuesday, 25 October 2016 05:44:34 UTC+1, Ch
I just need a vector of the values. The names are known from the circuit
file.
The problem is really just with converting the string to a Float64 value
when the file is Unicode from LTspiceXVII. Everything works fine with the
ASCII from LTspiceIV. More specifically, the capturing block which
I got this log file:
Circuit: * C:\Users\Jeff\Documents\LTspiceXVII\examples\test.asc
Direct Newton iteration for .op point succeeded.
current: i(r1)=2.5
Date: Tue Oct 25 03:55:44 2016
Total elapsed time: 0.134 seconds.
tnom = 27
temp = 27
method = modified trap
totiter = 2091
traniter = 2088
The circuit file is test1.asc (
https://github.com/cstook/LTspice.jl/blob/master/test/test1.asc). You
should be able to open it with LTspice and run the simulation to produce
the log file.
The log file is a human readable text file, which I am parsing to get the
measurements. LTspiceIV used A
I downloaded that software, did you create that log file? If so, how?
It is likely that what is being stored in the log file is not a sequence of
numbers in a vanilla format. So parsing it as a sequence of strings is not
going to work.
from their help:
OK, that works for bitmaps, but can I
The file (
https://github.com/cstook/LTspice.jl/blob/LTspiceXVII_compat/test/test1.log)
is a .log file produced by LTspiceXVII (
http://www.linear.com/designtools/software/). I'm using regular
expressions to parse the file. The code below shows the problem.
io = open("test1.log","r")
for line
This is rather odd, your character codes are control codes (0x02 STX, start
of text; 0x05 ENQ, enquiry) and really do not belong in a numeric string.
Do all the entries use that pattern "\x002\anumber.\x005\bnumber"? If so,
and the intended number is anumber.bnumber, there would be a way.
What i