question about getAsciiWave command

M

madhero

Guest
Hi All,

I used getAsciiWave command to draw a waveform from text file, but
when I use the following command:

plot(getAsciiWave("test.txt" 1 2 ?xskip 1 ?yskip 1))

What I want to do is to skip the first line in the file (contains the
headers), if the first line only contains letters and numbers, it
worked fine. But if it contains some symbol like ` or (, it will
return syntax error. Isn't the ?xskip and ?yskip supposed to
completely ignore the first line? Thanks.

Regards,

Weifeng
 
The error I met is because of the "`". Because I also need to use this
file to draw graphs in Saber Scope, I don't want to modify the file.

The file is like that:

Vds`V Ids_Vgs_8V`A
0.00E+00 2.00E-02
2.00E-01 4.00E-02
4.00E-01 6.00E-02
7.00E-01 6.00E-02
9.50E-01 8.00E-02
1.30E+00 8.00E-02
1.55E+00 8.00E-02
1.85E+00 8.00E-02
2.15E+00 1.00E-01
2.45E+00 1.00E-01
2.75E+00 1.00E-01
3.05E+00 1.20E-01
3.30E+00 1.00E-01
3.65E+00 1.00E-01
3.90E+00 1.20E-01
4.20E+00 1.20E-01
 
On Jun 16, 7:02 pm, madhero <uest...@gmail.com> wrote:
The error I met is because of the "`". Because I also need to use this
file to draw graphs in Saber Scope, I don't want to modify the file.

The file is like that:

Vds`V Ids_Vgs_8V`A
0.00E+00 2.00E-02
2.00E-01 4.00E-02
4.00E-01 6.00E-02
7.00E-01 6.00E-02
9.50E-01 8.00E-02
1.30E+00 8.00E-02
1.55E+00 8.00E-02
1.85E+00 8.00E-02
2.15E+00 1.00E-01
2.45E+00 1.00E-01
2.75E+00 1.00E-01
3.05E+00 1.20E-01
3.30E+00 1.00E-01
3.65E+00 1.00E-01
3.90E+00 1.20E-01
4.20E+00 1.20E-01
I have another question, how to mark the units (such as volts) using
getAsciiWave or plot command? Thanks
 
madhero wrote, on 06/17/08 00:12:
On Jun 16, 7:02 pm, madhero <uest...@gmail.com> wrote:
The error I met is because of the "`". Because I also need to use this
file to draw graphs in Saber Scope, I don't want to modify the file.

The file is like that:

Vds`V Ids_Vgs_8V`A
0.00E+00 2.00E-02
2.00E-01 4.00E-02
4.00E-01 6.00E-02
7.00E-01 6.00E-02
9.50E-01 8.00E-02
1.30E+00 8.00E-02
1.55E+00 8.00E-02
1.85E+00 8.00E-02
2.15E+00 1.00E-01
2.45E+00 1.00E-01
2.75E+00 1.00E-01
3.05E+00 1.20E-01
3.30E+00 1.00E-01
3.65E+00 1.00E-01
3.90E+00 1.20E-01
4.20E+00 1.20E-01

I have another question, how to mark the units (such as volts) using
getAsciiWave or plot command? Thanks
Because of the way that getAsciiWave parses the file, the title line does need
to be parsed by the SKILL parser. So it's a limitation - it parses the whole
file into a list, and then skips the first few entries. It doesn't read the
lines dumbly in and then parse the ones it needs. If you want this behaviour
changing, you'd need to contact customer support to get an enhancement request
to change this.

As for changing the units, see my sourcelink solution number 11265350

Put simply, you can do:

wave3=getAsciiWave("temp1" 1 2)
drGetWaveformXVec(wave3)~>units="V"
drGetWaveformXVec(wave3)~>name="Vds"
drGetWaveformYVec(wave3)~>units="A"

for example.

Regards,

Andrew.
 
On Jun 18, 4:55 am, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
madhero wrote, on 06/17/08 00:12:



On Jun 16, 7:02 pm, madhero <uest...@gmail.com> wrote:
The error I met is because of the "`". Because I also need to use this
file to draw graphs in Saber Scope, I don't want to modify the file.

The file is like that:

Vds`V Ids_Vgs_8V`A
0.00E+00 2.00E-02
2.00E-01 4.00E-02
4.00E-01 6.00E-02
7.00E-01 6.00E-02
9.50E-01 8.00E-02
1.30E+00 8.00E-02
1.55E+00 8.00E-02
1.85E+00 8.00E-02
2.15E+00 1.00E-01
2.45E+00 1.00E-01
2.75E+00 1.00E-01
3.05E+00 1.20E-01
3.30E+00 1.00E-01
3.65E+00 1.00E-01
3.90E+00 1.20E-01
4.20E+00 1.20E-01

I have another question, how to mark the units (such as volts) using
getAsciiWave or plot command? Thanks

Because of the way that getAsciiWave parses the file, the title line does need
to be parsed by the SKILL parser. So it's a limitation - it parses the whole
file into a list, and then skips the first few entries. It doesn't read the
lines dumbly in and then parse the ones it needs. If you want this behaviour
changing, you'd need to contact customer support to get an enhancement request
to change this.

As for changing the units, see my sourcelink solution number 11265350

Put simply, you can do:

wave3=getAsciiWave("temp1" 1 2)
drGetWaveformXVec(wave3)~>units="V"
drGetWaveformXVec(wave3)~>name="Vds"
drGetWaveformYVec(wave3)~>units="A"

for example.

Regards,

Andrew.
Thank you! I will write a small program to delete the lines. Your
answer about changing the units helped me a lot, thanks again.

Regards,

Weifeng
 

Welcome to EDABoard.com

Sponsor

Back
Top