About 749,000 results
Open links in new tab
  1. Import Text Files - MathWorks

    Import Data as Matrices. If your text file contains uniform data (all of the same type), you can import the data as a matrix. Importing your data into a matrix allows you to work with a minimally formatted array. Import tabular data from a text file into a matrix using readmatrix.

  2. assignin - MathWorks

    To assign values in the MATLAB base workspace, use 'base'. The base workspace stores variables that you create at the MATLAB command prompt, including any variables that scripts create, assuming that you run the script from the command line or from the Editor.

  3. How to assign variables to imported data columns - MATLAB …

    Sep 4, 2017 · I am working on a project where I have to load a .txt file that has 4000 raw and 2 columns. I would like to use the second column only in one of my calculations. How can I do that? I tried to assign variable x to be the first column and y to be the second, but I didn't know how.

  4. Control How MATLAB Imports Your Data - MathWorks

    Import your data into MATLAB® using an importing function, such as readtable. You can let MATLAB determine how to import your data, or you can specify parameters to control how MATLAB imports your data.

  5. importdata - MathWorks

    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.

  6. What Are Categorical Arrays in MATLAB and How Are They Used?

    Nov 3, 2020 · Categorical data are values assigned to a finite set of discrete categories. The purpose of this video is to define categorical data, import it into MATLAB, change existing data types into categorical data, and demonstrate how to …

  7. Create Tables and Assign Data to Them - MathWorks

    In MATLAB®, you can create tables and assign data to them in several ways. Create a table from input arrays by using the table function. Add variables to an existing table by using dot notation.

  8. Importing multiple data and assigning each columns into different ...

    Jul 22, 2022 · You have each variable into a column. You can access them by data(:,1), data(:,2) etc. No need to save each column into a different variable.

  9. How to read values from a table or Excel File and assign it

    May 1, 2014 · Hello, I am writing a MATLAB code for the design of a Horn Antenna. In the process, the code is supposed to read values from a table (or an excel file). To make it more clear, let us assume I have a table of two variables "a" & "b".

  10. setvartype - MathWorks

    Use detectImportOptions to create import options, set multiple variable data types, and then read the data using readtable. Create an options object. opts = detectImportOptions( 'patients.xls' );