2020年5月6日 星期三

Octave: Read data from csv file.

Octave/Matlab can read CSV file and do some processing or plot the data quickly and easily.
Below are simple codes that read a CSV file and make some parse.


1. Read Sample_Data.csv file and stored as char array:
    char = strsplit(fileread ("Sample_Data.csv"));

2. Simple parse: Iterate each element and skip first 5 column data

    for i = 1:size(char,2)
        result(i,:) = char((10*i)-5:(10*i));
    end





Ref:

沒有留言:

張貼留言

Linux driver: How to enable dynamic debug at booting time for built-in driver.

 Dynamic debug is useful for debug driver, and can be enable by: 1. Mount debug fs #>mount -t debugfs none /sys/kernel/debug 2. Enable dy...