.CSV to Jit.Matrix
I am doing a project where I want to make a projection by importing .CSV data to the jitter matrix.
Are there any patches which are helpful doing this?
Adam Murray posted a cellblock to CSV converter patch a while back. It might be just what you’re looking for.
If you used tab-separated values, it could be as simple as loading the file into [text], then accessing each line, out comes a list, go through [listfunnel] and populate your jit.cellblock cells. Not sure what happens when there are commas though, will have to try it out. Also, if your values have spaces in each cell, that could be tricky to deal with.
Would be great if jit.cellblock could read and write CSV/TSV files, but I imagine this would be a gigantic pain, especially for all the error possibilities or extreme cases with the data coming in. That’s a hugely complicated object already…
I’ve found the cellblock to csv from Adam Murray a while ago. That one is indeed useful for exporting matrix values to .CSV files.
However, rewrote my .java file that generates the .CSV matrices to the ASCII symbols. With jit.Textfile it was fairly easy to read in this matrix. However, it has limitations in regards to dimension (only able to read the visible ASCII code, leaves accuracy to: max 33 – 255 values) and jit.op has limitations with data handling (Can’t multiply).
Jit.fprint works better then jit.textfile. Gives more possibilities to operate afterwards, while importing its limit is set to 0-255 integers. Minor detail, i couldn’t get the csv working, although all other symbols used as dividers worked great.
I see this thread is a little old, but I need to do the exact same thing, and I don’t really understand the solutions that were suggested here. Are there any new options?