Exporting Vectors

Exporting Vectors

Vectors in Kst can be exported. This can be useful, for example, if you would like to use a vector generated by Kst in another application.

To export or save vectors to a file, select Save Vectors to Disk... from the File menu. A dialog will be displayed allowing you to choose which vectors to export.

Save Vectors to Disk

You can select one or more vectors from the list, and click Save... to export them to an ASCII file. This file will contain the data in rows, with one column for each vector exported. The first two lines of this file are commented out with “;” symbols. The first line contains the names of the exported vectors, and the second row is a visual separator.

Here is an example, for two 5 element vectors named “HWYD” and “PWMY”.

; ---------
-2 4
-1 1
0 0
1 1
2 4

If you have selected multiple vectors to export, a drop down menu at the bottom of the Save Vectors to Disk dialog becomes enabled. There are three options available...

Truncate long vectors.

All of the exported vectors will be truncated to match the length of the shortest vector selected.

Interpolate short vectors.

All of the exported vectors will be interpolated to match the length of the longest vector selected.

Save in separate files.

Each vector will be saved in a separate file. After hitting the Save... button you will be promted to enter a base file name, and then Kst will save each selected vector in a separate file named by appending .1, .2, .3, ... to this base.


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team