카테고리
Submission Archivesubmission
코드와 해설을 함께 읽는 학습 문서
Code Detail
Data I/O 중심의 Octave 학습 예제
ex-recv/02/02_scy/loadcsv.m
코드를 복사해 Octave에서 바로 실행할 수 있습니다.
function [date, close_price, high_price, low_price, open_price, volume, label] = loadcsv(filepath)
25 lines
# csv를 불러오는는 함수
# 작성자 : 신찬영
# 작성날짜 : 25.03.26.
#readcsv
function [date, close_price, high_price, low_price, open_price, volume, label] = loadcsv(filepath) # IN : 경로
rawdata = csv2cell(filepath); # (254,6) / 4행부터 사용
date = cell2mat(rawdata(4:end,1)); # OUT : (251,1)
close_price = cell2mat(rawdata(4:end,2)); # OUT : (251,1)
high_price = cell2mat(rawdata(4:end,3)); # OUT : (251,1)
low_price = cell2mat(rawdata(4:end,4)); # OUT : (251,1)
open_price = cell2mat(rawdata(4:end,5)); # OUT : (251,1)
volume = cell2mat(rawdata(4:end,6)); # OUT : (251,1)
label = rawdata(1,:); # OUT : (251,1)
end
ex-recv/01/01-CJW-20250321/수치미분.m
ex-recv/01/01-CJW-20250321/main_cjw.m
ex-recv/01/01-JKH-20250319/main-my_diff.m
ex-recv/01/01-KSG-20250318/hw_1_kim-gpt.m
ex-recv/01/01-KSG-20250318/hw_1_kim.m
ex-recv/01/01-LSH-20250319/[Octave] HW#1.m
ex-recv/01/01-MJY-20250319/Octave_Moon_250319.m
ex-recv/01/01-PJM-20250319/Octave01_Park,jm_250319.m