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?

回答(1 个)

Thorsten
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;

类别

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