I need to convert a CSV file of decimal numbers into a C float variable. How can I do that?
data.csv
0.1,0.2,0.3,0.4,0.5
1.1,1.2,1.3,1.4,1.5
2.1,2.2,2.3,2.4,2.5
3.1,3.2,3.3,3.3,3.5
4.1,4.2,4.3,4.4,4.5
output:
------------START OF PROGRAM------------
Filesize: 99 Bytes
CSV_content =
[ 0.100000 0.200000 0.300000 0.400000 0.500000 ]
[ 1.100000 1.200000 1.300000 1.400000 1.500000 ]
[ 2.100000 2.200000 2.300000 2.400000 2.500000 ]
[ 3.100000 3.200000 3.300000 3.300000 3.500000 ]
[ 4.100000 4.200000 4.300000 4.400000 4.500000 ]
------------END OF PROGRAM------------
This is my self Answer. My old answer post was deleted. So if you see comments about correcting things that have already been corrected (in here or my quesrion post), that's why.
Latest version of the Code:
Data.csv
Output