フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to merge one column dataset into big dataset file

1 回表示 (過去 30 日間)
Moshe
Moshe 2016 年 9 月 22 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
i am importing big excel file with dates and data into MATLAB. i am using MAC while the Excel is imported to matlab the dates column is corrupted. i sucsses fixing the corrupted dates in different dataset column. now i wanted the replace the corrupted dataset dates column with the fixed one and merge it to the all other data. how can i do it?
for example:
ds1= all data imported from the excel file and transform into dataset, but in this file the first column is the dates with the corrupted dates. Size of ds1 = 373x14 ds2 = this is only one column with the fix dates. Size of ds2 = 373x1
how i merge ds2 into ds1 and keep them stay as dataset?

回答 (1 件)

KSSV
KSSV 2016 年 9 月 22 日
As the rows in ds1 and ds2 are same. You can replace the first column or merge easily.
Replace:
ds1(:,1) = ds2 ; % replaces corrupted dates with corrected dates
  1 件のコメント
Moshe
Moshe 2016 年 9 月 22 日
the two ds are the same length. now i got this error from 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);

この質問は閉じられています。

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by