Best shap for data to be in to work on.

조회 수: 1 (최근 30일)
Scragmore
Scragmore 2011년 11월 22일
Hi,
I have a number of years of time series data of the format;
Date Time Open High Low Close
734141 1544 1.6152 1.6152 1.6152 1.6152
734141 1545 1.6152 1.6153 1.6151 1.6152
734141 1546 1.6152 1.6152 1.6152 1.6152
This is stored in an Access DB that I am able to import change dates, times, manipulate the data ect..
I would like to do analysis on data per day, such as Max(time_a, time_b), HighLow(t_a, t_b), price_direction(after_t_c), MovAv, interval_diff.
What I am having trouble with is the shape of my initial stored data in matlab. Should I store it as a single array of time series data, a double array or would a struc for each day be better. I eventually would like to run my complete data set of day data through functions I build, testing my models and ideas, creating flags when criteria are met.
I know this is a slightly unusual question as you all usually deal with code/math issues that can be solved by debugging or writing/suggesting code. If your unable to help would some one be able to point me in the direction of a matlab forum/group that might be able to advise. I am unemployed and not in a class or college so I don't have colleagues or profs to ask or discuss with.
Many thanks.
AD

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 11월 22일
It looks to be a good use case for dataset(). See doc dataset.
  댓글 수: 3
Fangjun Jiang
Fangjun Jiang 2011년 11월 23일
I regard dataset() as an enhancement of structure. I have not used it very often so I have to learn it myself too. I believe it can be done. The nice part of it is that you can use those header text such as 'time','open','close' to reference your data thus make it much more readable.
You can use regular 2-D array to achieve the same if it's more comfortable or easier for you. You probably just need to use logical index for most of your query. For example.
index=data(:,1)==734141;
SelectedData=data(index,:);
This way, you just need to remember which column is Date, which column is Time, etc.
Scragmore
Scragmore 2011년 11월 24일
Hi,
Thanks for your time and suggesting this. Unfortunately I am still unable to work out how to query the dataset.
I shall continue to look for some help on how I should construct my data.
Thanks and regards,
AD

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Holidays / Seasons에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by