- 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?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen

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 Kommentare
Antworten (1)
Divyanshu
am 27 Feb. 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 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!