How can I check if a table contains numbers only?
Ältere Kommentare anzeigen
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 Kommentare
Mario Malic
am 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
am 9 Mai 2020
Can the x values be repeated once? 1 2 3 3 4 5 5 6 6 7 8 for example?
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 9 Mai 2020
1 Stimme
Did you try the readmatrix() function? I believe it will import only numbers. Otherwise use xlsread() to get only the numbers.
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!