Search results
An HTMLImportOptions object enables you to specify how MATLAB ® imports structured, tabular data from HTML files. The object contains properties that control the data import process, including the handling of errors and missing data.
- Isvarname
tf = isvarname(s) determines if input s is a valid variable...
- Readtimetable
TT = readtimetable(___,Name,Value) creates a timetable from...
- detectImportOptions
opts = detectImportOptions(filename) locates a table in a...
- Access Data in Tables
You can index into tables by specifying variable names using...
- Importing and Exporting Data
You can export variables from the MATLAB workspace to...
- Importdata
Data from the file, returned as a matrix, multidimensional...
- Isvarname
MATLAB includes functions tailored to import specific file formats. Consider using format-specific functions when you want to import an entire file or only a portion of a file. Many of the format-specific functions provide options for selecting ranges or portions of data.
To read HTML code from a web page, use webread. To extract text from an HTML file, use extractFileText.
You can export variables from the MATLAB workspace to various file formats, both character-based and binary. You can, for example, create HDF and Microsoft ® Excel ® files containing your data. For details, see the documentation on Supported File Formats for Import and Export .
Use datastores for large or multiple files. fileDatastore can be used with any type of file. Use a custom datastore for more advanced control over read behavior.
Use the Java Swing component inside a MATLAB figure, precisely JEditorPane using MATLAB's javacomponent() function. JEditorPane supports a good subset of HTML. Here is a code sample: mytext = '<html><body><table border="1"><tr><th>Month</th><th>Savings</th></tr><tr><td>January</td><td>$100</td></tr></table></body></html>'; hfig = figure();
Data from the file, returned as a matrix, multidimensional array, or scalar structure array, depending on the characteristics of the file. Based on the file format of the input file, importdata calls a helper function to read the data.