dimension mismatch??! i cant see how this can be a dimension mismatch?
    4 ビュー (過去 30 日間)
  
       古いコメントを表示
    
A.textdata(:,3) holds a large set of dates
I am trying to do this:
for i=1:size(A.textdata)
Dates(i,1) = datenum(A.textdata(i,3),'dd-mm-yyyy HH:MM:SS');
Dates2(i,1) = datestr(Dates(i,1),'dd-mm-yyyy ')
end
but i am getting thins error:
> ??? Subscripted assignment dimension mismatch.
Error in ==> Load at 12 Dates2(i,1) = datestr(Dates(i,1),'dd-mm-yyyy ')
Why is that? i cant see how there can be any dimension mismatches??
0 件のコメント
採用された回答
  Daniel Shub
      
      
 2011 年 10 月 19 日
        The problem is that
Dates2(i,1)
is a scalar, but
datestr(Dates(i,1),'dd-mm-yyyy ')
returns a string with length 10.
Dates2(i,:) = datestr(Dates(i,1),'dd-mm-yyyy ');
should work.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Dates and Time についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

