Plotting from LTSpice

I have a problem, I’m new with octave. I generated from LTSpice input and output voltage (.txt). I opened the file and I saw 3 columns (time, input and output). No idea how to plot this! some help???

first, just do verify did you create this using the ‘Export data as text’ option?

and if so does the data look sort of like:

time	V(top)	V(n010)
0.000000000000000e+000	0.000000e+000	0.000000e+000
9.765624975344167e-010	8.358728e-008	-3.241581e-016
1.953124995068833e-009	1.671728e-007	-6.483000e-016
6.249999984220267e-008	5.344506e-006	-2.069774e-014
2.499999993688107e-007	2.131546e-005	-8.218744e-014
4.999999987376214e-007	4.246557e-005	-1.627446e-013
9.999999974752427e-007	8.427985e-005	-3.188365e-013
1.999999994950485e-006	1.660329e-004	-6.101515e-013
3.999999989900971e-006	3.225426e-004	-1.104970e-012
7.999999979801942e-006	6.144540e-004	-1.791687e-012
1.349041232540375e-005	9.786326e-004	-2.133428e-012
...

If you did not use the .STEP command, then you should only have one line of text that is non-numeric. You can use a data input function like dlmread to read the data.

to see the full details of how to use that function, type help dlmread. the following command assumes a tab-separated file, and skips the first row and 0 columns of info (so it skips the header).

newdata = dlmread("file.txt", "\t", 1, 0)
newdata =

          0          0          0
   0.000000   0.000000  -0.000000
   0.000000   0.000000  -0.000000
   0.000000   0.000005  -0.000000
   0.000000   0.000021  -0.000000
   0.000000   0.000042  -0.000000
   0.000001   0.000084  -0.000000
   0.000002   0.000166  -0.000000
   0.000004   0.000323  -0.000000
   0.000008   0.000614  -0.000000
   0.000013   0.000979  -0.000000

don’t worry if they’re all showing zeros, its’ just the default attempt to display everything at the same level of precision. the data is actually there to the full precision that LTSpice exported.

newdata (4,3)
ans = -2.0698e-14

if you DID use the STEP function in LTSpice, then there will be more rows with non-numeric text down the file, and it will get a bit trickier to just pull out the data.