필터 지우기
필터 지우기

i am trying to replace one column with another in dataset?

조회 수: 2 (최근 30일)
Moshe
Moshe 2016년 9월 29일
답변: Thorsten 2016년 9월 29일
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에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by