How to bring Quartly format time excel data to matlab
4 次查看(过去 30 天)
显示 更早的评论
Hi.
I'm about to bring time data from matlab. But the problem is that this data is 'quarterly' form such as
time
1981q1
1981q2
...
2011q1
whenever I bring this data using xlsread(), matlab doesn't recognize these data. How can I bring to matlab?
1 个评论
Walter Roberson
2011-5-13
duplicates http://www.mathworks.com/matlabcentral/answers/3646-converting-to-quarterly-time-from-xls
采纳的回答
the cyclist
2011-3-24
When you say that MATLAB doesn't recognize these data, what do you mean? Just that it does not recognize them as dates?
You might need to read them in as strings (which I am guessing is what xlsread does), then manually extract the first four characters as the year, and the last one as the quarter. Then you could convert those strings to numeric (using str2num).
0 个评论
更多回答(1 个)
Oleg Komarov
2011-3-24
This is a duplicate post.
Please refer to the answer I've given you here: http://www.mathworks.com/matlabcentral/answers/3646-converting-to-quarterly-time-from-xls
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!