How to merge or combine 2 datasets with different number of rows and different name of columns

2 views (last 30 days)
  2 Comments
Ngoc Nguyen
Ngoc Nguyen on 10 May 2022
Dear Raju,
Thank you very much for your comment!
I tried the codes you suggested but the outcome has an error:
>> table1=table([1;2;3],[151.04;151.08;151.11], [3.2634e+05;1.6518e+05;1.1548e+05], 'VariableNames', ["id", "mz", "sp58"]);
table2=table([0;1;2;4],[150.09;151.04;151.08;151.09], [217504.6;122152.8;561438.7;88868.3], 'VariableNames', ["id", "mz", "sp59"]);
table12 = joindata(table2,table1, 'Keys', ["id", "mz"]);
Undefined function or variable 'joindata'.
I am using MATLAB (individual) version 2018b for academic use. I am still struggling with this error and trying to understand the reason before successfully applying your solution.
Thank you for your consideration!
Best regards,
Ngoc

Sign in to comment.

Answers (0)

Categories

Find more on Data Import and Export in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!