Splitting data array into sub arrays
조회 수: 3(최근 30일)
Hi, I want to split the data of an array by the first 2 numbers of each data. This is to split firms by the first 2 digit of their SIC codes.
Example: 3301 would be in the sub array 33 which would represent a sector.
Any suggestions would be helpful.
dpb 2021년 1월 20일
>> SIC=[3301, 4502, 3306, 4602, 4510].';
NB: The use of mod above was in error, dunno how I came up with that, but as long as they're all four-digit codes, the above should be about as easy as it gets.