i am trying to replace one column with another in dataset?
2 次查看(过去 30 天)
显示 更早的评论
Hi all,
I have big dataset matrix that the dates column is corrupted. I success fixing the date in another dataset matrix with only one column. In the big matrix the column is the column i want to replace. The big matrix size : 374x14 the fix column i want to replace in the big matrix is : 374x1
example to line in matalb i wrote for the replace? Load_DATA(:,1) =Date_Fix ; % replaces corrupted dates with corrected dates
error i getting in matlab:
Error using dataset/subsasgnParens (line 133) Subscripted assignment dimension mismatch for dataset variable 'Date'.
Error in dataset/subsasgn (line 79) a = subsasgnParens(a,s,b,creating);
Error in DATA_INPUT (line 24) Load_DATA(:,1) =Date_Fix ; % replaces corrupted dates with corrected dates
Can someone help me to resolve it?
0 个评论
回答(1 个)
Thorsten
2016-9-29
Probably the size of your variables are not as descripted. Otherwise it works as expected:
Load_DATA = rand(374, 14);
Date_Fix = rand(374, 1);
Load_DATA = Date_Fix;
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!