- Create a table with number of columns equal to maximum variables of all the entries of XML file.
- Now for each item on xml file create a row and fill the variables/columns with values.
- If the current item is having less variables than maximum, you can fill those columns with '-'.
How to convert the data entry where rows have uneven entry within xml into a table?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos

While running the code on this data the centroid which is a variable has 385 entries, in which there are three variables. However on some rows there are four variables example on row number 12. There is entry of variable with name 1event. The loop stops at row 12 and give a error mentioned in the above picture. You can also see ME exception.
Thanks for your consideration.
0 comentarios
Respuestas (1)
Divyanshu
el 27 de Feb. de 2024
Hi Praful,
The reason you are getting this error 'All tables being vertically concatenated must have same number of variables' is because table is a structured data and cannot have different number of columns in different rows.
A possible workaround can be :
Hope it helps!
0 comentarios
Ver también
Categorías
Más información sobre Tables en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!