Assign partnames to two different tables with measurement datas
1 view (last 30 days)
Hi, I'm pretty new in matlab and I'm working on my skills during an internship. Now I have a problem, what seems a little more specific than most of similar problems, which is why I didn't find a solution on here. I have two differents tables with one column in both tables has the listnames of parts like for example 'M1'. One Table is the partlist with general informations, the other list has the measurement data of the specific part.
How can i search for the partname and get a new table or maybe matrix, were the partnames lists with general informations and measurement datas? It could be that the names dont follow a specific order or don't exist in both. For Example i'd wish something like that (sorry for my missing skills):
Table 1: Table 2: = new Table 3:
Name Date Name: Temperature: Name: Date: Temperature:
M2 23.03.21 M3 278 M1 20.03.21 293
M1 20.03.21 M2 293 M2 23.03.21 278
M3 25.03.21 M1 280 M3 25.03.21 280
I tried to create a new table 4 at first with only the PartNames and then run a for loop like that to finde the row indices.
for i = 1:n
rowNumber1 = find(contains(table1.Name, table4(i,1)));
rowNumber2 = find(contains(table2.Name, table4(i,1)));
Then i'd use the rowNumbers to add together the specific rows. So far with my idea but I'm really overwhelmed with this problem.