How can I check if a table contains numbers only?
Afficher commentaires plus anciens
Good evening,
I am trying to develop a MATLAB application that adds values to a table by reading them from an excel file, but these values need to be all numbers and the x-values in the table cannot be repeated twice. Can someone please help me?
Thank you
Edit: I forgot to mention that the program works, reads the data from the sheet, writes them on the table with the readtable functiion but I cannot implement validtation.
2 commentaires
Mario Malic
le 9 Mai 2020
I would suggest trying to import data into a cell (or other type that will make it easier to write it to the table) variable and remove the values you don't need from there. Then write it to table.
Walter Roberson
le 9 Mai 2020
Can the x values be repeated once? 1 2 3 3 4 5 5 6 6 7 8 for example?
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 9 Mai 2020
1 vote
Did you try the readmatrix() function? I believe it will import only numbers. Otherwise use xlsread() to get only the numbers.
Catégories
En savoir plus sur Tables dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!