[Kst] [Bug 157472] KstScript can not load matrices from Data Sources
Andrew Walker
arwalker at sumusltd.com
Thu Feb 14 22:17:54 CET 2008
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=157472
arwalker sumusltd com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From arwalker sumusltd com 2008-02-14 22:17 -------
javaScript now has sufficient functionality to read matrices from an ascii data source. The script would look something like:
ds=new DataSource("\root\asciimatrix.txt")
ds.setConfiguration("dataStartLine","1")
ds.setConfiguration("readFieldNames","true")
ds.setConfiguration("readFieldNamesLine","0")
ds.reset()
m=new DataMatrix(ds, "[Matrix,50,0,0,0.5,0.5]")
NOTES:
You must use a DataMatrix, as a Matrix is simply a static matrix that is not connected to a data source.
The call to reset() is essential as it tells the data source to reparse the data file after the configuration settings have been changed.
The text identifying the matrix "[Matrix,50,0,0,0.5,0.5]" must match exactly with the text in the data file.
More information about the Kst
mailing list