顯示具有 Octave 標籤的文章。 顯示所有文章
顯示具有 Octave 標籤的文章。 顯示所有文章

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:

2017年6月7日 星期三

Octave: Modulation Sine Wave use PWM generate look up table for MCU DAC.

Input the target sample frequency ,sample bits and sample frequency.Generate the duty of PWM(percentage).
Code:
Avoid the negative part cause normally MCU didn't have negative voltage output ability.







Ref:
    1.http://bugworkshop.blogspot.tw/2011/04/blog-post_12.html

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...