# Matlab Read Line Number

If you attempt the extra credit, you likely will need to use the rand( ) function. csvread fills empty delimited fields with zero. read a line. Learn more about reading, textfile, string, number, regexp, fscanf MATLAB. This MATLAB function reads a comma-separated value (CSV) formatted file into array M. Two, we read one value (or a single line of values) at a time, whereas by default in Matlab, you may read many values at once. Thanks for Reading!. csv file with text and numbers? Learn more about reading a. csv file, creating a for loop for 1000. it changes row-to-row. Yes, you can use the printopt() and print() functions to perform the task using the keyboard, but only if you’re willing to perform the task. An anonymous function is like an inline function in traditional programming languages, defined within a single MATLAB statement. To exclude the terminator, use fgetl. Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. If either end of the line is within five pixels of a corresponding port, the function connects the line to it. Select the "Preferences" button with your mouse and select "Show Line Numbers. • MATLAB is not optimized for looping operations (read: they execute slowly)! • Most of the time, there are alternatives to using. 1 We can enter this data into Matlab with the following commands entered T (C ) 5 20 30 50 55 0. Write formatted data to file. Many students ask me how do I do this or that in MATLAB. In line comments are usually made using the "single line" commenting syntax of the language. The procedure is easily adaptable to many situations. Do you notice anything strange about the solution given to the last step? We almost never use MATLAB like this, however the format of the output is difficult to read, and it’s – hard to keep track of complicated calculations. You can define an anonymous function right at the MATLAB command line or within a function or script. C++ has some nice iostream objects that do a bunch of nice stuff this way. Plotting Data Consider the data in Table 1. Reading a text file in MATLAB line by line. I have This image which is basically made of sloped lines (almost horizontal and parallel) I tried exactly the code in matlab documentation to detect those lines (except the rotation part) but I got a very strange result (vertical lines detected and no single horizontal line!): I really can't find explanation of this output. read a line. When using datetick(), you need an axis that has numbers that are in the range of the dates you need. ASCII Chart in Matlab In this article we have three goals: first, we're going to develop an ASCII chart to understand instructions char and double in Matlab; second, we're going to work with a simple ASCII conversion technique as an example of simple encoding, and third, we're going to develop a rot13 method, which happens to be another encoding technique. A = sscanf(s,format,size) r eads the amount of data specified by size and converts it according to the specified format string. MATLAB is wonderful with numbers. Ignore the program, what's important is to use fgetl ,I include some comment for you in the code, just wanna emphasis that first time you use fgetl, it reads the first line, next time you use it it will read the second line, so you don't have to have a counter for the lines, unless you want to save the lines like I did and I assigned a variable. It deals with text but you can tell that its heart isn't in it. current date and time as date number. Matlab can read files with values separated by TABs (called Tab delimitted files) with the function tdfread. When using datetick(), you need an axis that has numbers that are in the range of the dates you need. A string matrix is like any other, except the elements in it are interpreted asASCII numbers. % t=0:tf/1000:tf; % We need only initialize the time increment once. Because the classifier or diagnosis result can be an arbitrary real value (continuous output), the classifier boundary between classes must be determined by a threshold value (for instance, to determine whether a person has hypertension based on a blood pressure measure). So C code will work just fine. You can load data into matlab using the "load" command. How to read a. If you were to use C or FORTRAN then that last example could get you into big trouble. Keep in mind that this provides only the capability to read TDM/TDMS files with the MATLAB® software environment and that the example has been tested with MATLAB® Versions. To exclude the terminator, use fgetl. csv file, faq 4. Matlab, on the other side, will do the rest of the job: a script will be run, and at a fixed frequency, will send the Temperature reading request string to Arduino, and will read back the temperature value sent to the serial buffer plotting it in a real time graph Temperature vs Time. Also check by double-clicking on a that a’s value has changed. m % Incorrect Error: Uninterpretable number of outputs set on command line "commandline". The fread function reads a stream of data at the byte or bit level. Number of lines in a txt file (empty lines Learn more about txt file, lines, read data MATLAB. Is there a way to read a line of data from the serial port from DOS/NT COMMAND. Using lines of code to compare a 10,000-line project to a 100,000-line project is far more useful than when comparing a 20,000-line project with a 21,000-line project. fgets returns at most nchar characters of the next line. collapse all in page. How to read a. This table shows valid forms for a complex. Use the function name isevenorodd. As always, remember that Matlab netCDF functions adopt the convention of C language: The counting starts from zero instead of one. Practice math problems like Read Data from a Line Plot with interactive online worksheets for 3rd Graders. To read the first line from the file badpoem. A straight line is a 1st-degree polynomial, so the. Hi I am a Pyth noob and wanted to import a text file. In MATLAB, you create a matrix by entering elements in each row as comma or space delimited numbers and using semicolons to mark the end of each row. Projects hosted on Google Code remain available in the Google Code Archive. If you read with inf as a size, then you are going to read to end of file, in which case the second fscanf() is not going to have any file to read from. Look up the help for fread(), fgets() or fgetl(), and fclose(). Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). 8, and 27 entered in that order, MATLAB produces the following plot: The eval Command. Specifies the total number of values read from the instrument. I only need foF2, fxI. Color pictures generally contain three times as much data as grayscale pictures, depending on what color representation scheme is used. For me, currently, method 1 is fastest, with methods 2 and 3 being 50-100% slower. " This should put lines of code on the left hand side of your screen. For example, when you type datenum(‘9,15,2014’) and press Enter, you get an output value of 735857. For anything in a computer more complicated than a list of numbers, structures can be used. A vector is a one-dimensional array and a matrix is a two-dimensional array. 0/0 i and j i = j = square root of -1 realmin The smallest usable positive real number realmax The largest usable positive real number. Variable Types: The only type of variable in MATLAB is an array. Analogous to a bit, a ternary digit is a trit (trinary digit). MatlabHelp. Without reading the characters or lines, you can't tell how many times the newline character would appear, unless the creator of the text file put that information in the headerline information. Additionally we can read a file using the fopen and fscanf commands similar to C file IO. % AMC file has to be in the AMC format used in the online CMU motion capture library. A FixedWidthImportOptions object enables you to specify how MATLAB imports fixed-width tabular data from text files. Learn more about reading, textfile, string, number, regexp, fscanf MATLAB. Graph Individual (x,y) Points - powered by WebMath. To write data, we use the fprintf function that we are used to. A Structure is a named collection of data representing a single idea or "object". A particle filter is a recursive, Bayesian state estimator that uses discrete particles to approximate the posterior distribution of an estimated state. Write a program in matlab to check whether the given number is even or odd. Convert Between Datetime Arrays, Numbers, and Text Overview. The fread function reads a stream of data at the byte or bit level. The function behaves like strread except it works by parsing a file instead of a string. MATLAB knows the number , which is called pi. Manually search and replace ' + ' and ' - ' in each file outside matlab. For example: line = 'bla bal bli : 3 5 12 15 266' I tried sscanf but it requires I know how many numbers are in the string a. Edit: I measured the performance of the answers provided so far. We have finished the body of our loop, so MATLAB increases i to 2, starts from the top again, and prints out i^2 = 2^2 = 4. When going over this tutorial, you are recommended to implement the examples yourself and then run them in the MATLAB command window and carefully study the outcome and compare it to the code. This is a huge niche—one way to tell is to look at the number of MATLAB-related books on mathworks. , plotting) can also be accomplished using a command-line equivalent. MatlabHelp. Even for supercomputer users, MATLAB can be a valuable environment in. 2 Array Preallocation One convenient characteristic of MATLAB's default matrix ariablesv is the ability to dynamically aug-ment rows and columns. Each of these tasks is done at the MATLAB command line and then again from an interactive UI built in MATLAB. MATLAB understands that receiving only one argument actually means the user is telling the program to use the same number of grid lines and spacings for the "X" and "Y" values. Learn more about reading, textfile, string, number, regexp, fscanf MATLAB. In my last post I presented Matlab code to synthesize multiplierless FIR filters using Canonic Signed Digit (CSD) coefficients. The value I'm interested in is in the first column above the. The file has a five line header (including blank lines) and each column of numbers has a text label. If you put all of your m-files in the same directory that you run MATLAB from, then MATLAB will always find them. 8, and 27 entered in that order, MATLAB produces the following plot: The eval Command. These are a couple of m-files I wrote to read and write mp3 audio files (i. • They exist in MATLAB, but should be avoided as much as possible. net - A Resource for the Technical Computing Community A Resource for the Technical Computing Community. matlab: The backslash escape sequence is stored as two characters in the string and interpreted as a newline by the IO system. If you are using nedit, there are two helpful things you should do to get started. This is the only function able to read numbers and text from a text file. ) Exceptionally long files. js, and webgl, no plugins or downloads are required. Run the MATLAB code: How can I read a le consisting of an unknown number of lines and a variabel number of data on each line. 8660 instead of exactly 3/2. Textread is designed to read a list of numbers, one per line. [A,count] = fscanf(___) additionally returns the number of fields that fscanf reads into A. Calculating power and energy content of a signal in MATLAB August 19, 2019 January 21, 2010 by Mathuranathan Please g o here for the updated discussion : Calculation of power and verifying it through Matlab is discussed here. MATLAB - Data Output - Data export (or output) in MATLAB means to write into files. It can be used as a textbook in first-year engineering courses or as a reference in more advanced science and engineering courses where MATLAB is introduced as a tool for solving. MATLAB Users’ Guide Cleve Moler Department of Computer Science University of New Mexico November, 1980 Abstract MATLAB is an interactive computer program that serves as a convenient "laboratory" for computations involving matrices. Here, if the number of iterations surpasses 100, the break command tells Matlab to leave the while loop and proceed to the next set of statements (the switch statement in this case). Here, ﬁmanipu-. This reference is organized into general categories. A variable in MATLAB is one of two types: numeric or string. csvread imports any complex number as a whole into a complex numeric field, converting the real and imaginary parts to the specified numeric type. fgets returns at most nchar characters of the next line. MATLAB makes it easy to read from an Excel spreadsheet. The number of lines depends on the number of newline characters which I believe is char(10) on the ASCII table. net is a resource for the technical computing and engineering community. The answer, of course, should be zero, but MATLAB returns a small, but finite, number. Similarly >> fprintf(’%16s 12345678901234567890 ’,s) big red barn 12345678901234567890 Examples De ne some data and print it in the simple-minded way n = 5; x = linspace(-pi,pi,n); y = x/1e6; z = x*1e6;. MATLAB GUIs for Data Analysis In addition to the various MATLAB functions for performing data analysis, MATLAB provides four graphical user interfaces (GUIs) that facilitate common data-analysis tasks. To exclude the terminator, use fgetl. – jub0bs Feb 8. Cell arrays provide a more flexible way to store strings of varying length. savematfile — write a Matlab MAT-file (binary or ASCII) Matlab to Scilab Conversion Tips. csvread fills empty delimited fields with zero. file MATLAB. A help facility provides on-line information for most MATLAB topics. Data files having lines that end with a nonspace delimiter, such as a semicolon, produce a result that has an additional last column of zeros. Toggle Main Navigation Products. Hover over values, scroll to zoom, click-and-drag to rotate and pan. Many of the apps on your phone make use of these various sensors to operate. The file has a five line header (including blank lines) and each column of numbers has a text label. the name of file is 'num. Calculating power and energy content of a signal in MATLAB August 19, 2019 January 21, 2010 by Mathuranathan Please g o here for the updated discussion : Calculation of power and verifying it through Matlab is discussed here. Getting Help in MATLAB. Read the ﬁle and then output the molecular weight. MATLAB is wonderful with numbers. el --- major mode for MATLAB dot-m files ;; ;; Author: Matt Wette , ;; Eric M. When generating a Simulink S-function, the outputs specified on the command line was not a number. To make Matlab display more digits, enter ˛ formatlong ˛ pi Note that this does not change the number of digits Matlab is using in its calculations; it only changes what is diplayed. The downside of course is that you have to know the number of rows that you're reading beforehand. with either Matlab or Scilab (unless he is desperate or brilliant). The second format specifier in this example, %sLevel, tells textscan to read the second field from a line in the file, but to ignore the initial string 'Level' within that field. MATLAB provides ample tools for performing mathematical operations. MATLAB will read the file contents into a matrix called “datafile” (without the file extension). ASCII Chart in Matlab In this article we have three goals: first, we’re going to develop an ASCII chart to understand instructions char and double in Matlab; second, we’re going to work with a simple ASCII conversion technique as an example of simple encoding, and third, we’re going to develop a rot13 method, which happens to be another encoding technique. Basically, open the file, with fgets() read Xa-1 lines and ignore them, then read the Xa'th line, throw away some more lines until you get to the Xb'th line and then read that, etc. Dot plot is another name for a number line plot. If the number of characters specified by nchar includes characters beyond the newline character or the end-of-file marker, then fgets does not return any characters beyond the new line character or the end-of-file marker. line_in = fgets(fid) % read line including newline character. In this tutorial, we will learn how to read the data from an Excel file and use the data in Matlab. my file is in binary numeric data and inorder to open that file I have to open it with the help of Hex editor tools and i need to import that data into workspace so that i do buffer operation over it and my commands for reading that data are like this but I am facing trouble when i use 'from workspace' block in simulink to get the data from B. This is the only function able to read numbers and text from a text file. This reference is organized into general categories. I have This image which is basically made of sloped lines (almost horizontal and parallel) I tried exactly the code in matlab documentation to detect those lines (except the rotation part) but I got a very strange result (vertical lines detected and no single horizontal line!): I really can't find explanation of this output. csv file, creating a for loop for 1000. While it is certainly possible to read at file at specific offsets without reading each line via seek, with files using line feed terminated variable length records something has to read the data to determine the 7th record. Read binary data from file. Textread is designed to read a list of numbers, one per line. The line can have multiple segments. How to choose the right Learn more about number of input channel. It helps to know the format of the file. Have the user specify the number of elements in a molecule in a ﬁle. The input buffer is filled. Read line from file, keep newline character. line_in = fgets(fid) % read line including newline character. An Brief Introductory Guide to MATLAB by Ian Cavers, UBC computer science edits by Jack Snoeyink, UNC Chapel Hill computer science 1 Introduction MATLAB provides a powerful interactive computing environment for numeric computation, visualization, and data analysis. There are two main differences. Textread takes several optional parameters which can be used to influence how it works. What spurred me into writing matlab-prettifier is that none of the existing tools do a great job at replicating the syntax highlighting of the Matlab editor, and I think Matlab beginners learn more effectively if they're exposed to code that is highlighted in a consistent manner, whether is be in the Matlab editor or in a PDF. 2 The guide tool window. MATLAB by MathWorks is a computational tool used by many engineers, scientists, and mathematicians to analyse data and present their results in the form of numbers, images, or even video. In Matlab, everything that can be done using the GUI interface (e. By default, the input function expects to read a number, and if the user types: hello it will assume that hello is a variable containing a number. Read each line one by one and then decide which line to process or ignore. Similarly, any text on a line following a % can contain textual comments and not Matlab commands. MATLAB ® combines a desktop environment tuned for iterative analysis and design processes with a programming language that expresses matrix and array mathematics directly. For me, currently, method 1 is fastest, with methods 2 and 3 being 50-100% slower. Many programming errors are caused by using a row vector where a column vector is required, and vice versa. Print out those lines in each file that aren't in the LCS. I'm trying to textscan a file and read a single line until the end of it, undependently of the number of elements in that line. The input buffer is filled. All input is converted into a numerical value or array. These are the lines that you need in your Matlab script to wait for a file, import the values, delete the file, and plot the result. Wait for user response. csvread imports any complex number as a whole into a complex numeric field, converting the real and imaginary parts to the specified numeric type. dlmread imports any complex number as a whole into a complex numeric field. 5); c=x+1i*y; z=c; for k=1:50, z=z. Basically, open the file, with fgets() read Xa-1 lines and ignore them, then read the Xa'th line, throw away some more lines until you get to the Xb'th line and then read that, etc. To exclude the terminator, use fgetl. To use this data with the load command you would have to delete the text labels and save the file. Do you notice anything strange about the solution given to the last step? We almost never use MATLAB like this, however the format of the output is difficult to read, and it’s – hard to keep track of complicated calculations. txt file formatted like this : 602,598,302,456,1023,5. A help facility provides on-line information for most MATLAB topics. The third line sets xto be a+bwhich is 7 (again output is suppressed). What spurred me into writing matlab-prettifier is that none of the existing tools do a great job at replicating the syntax highlighting of the Matlab editor, and I think Matlab beginners learn more effectively if they're exposed to code that is highlighted in a consistent manner, whether is be in the Matlab editor or in a PDF. Reading a text file in MATLAB line by line. To write data, we use the fprintf function that we are used to. File Input and Output in Matlab. MATLAB makes it easy to read from an Excel spreadsheet. 0400000e+02 1. A string matrix is like any other, except the elements in it are interpreted asASCII numbers. MATLAB imports date fields from Excel files in the format in which they were stored in the Excel file. Write binary data to file. csvread fills empty delimited fields with zero. For anything in a computer more complicated than a list of numbers, structures can be used. So we took a simple example of an excel spreadsheet where the first column consists of a student number and the second column has the examination scores of the students. Similarly >> fprintf(’%16s 12345678901234567890 ’,s) big red barn 12345678901234567890 Examples De ne some data and print it in the simple-minded way n = 5; x = linspace(-pi,pi,n); y = x/1e6; z = x*1e6;. But now I run to another problem, how can I read the particular text from header line. This is because MATLAB (and any other program) stores floating point numbers as sequences of binary digits with a finite length. One trit is equivalent to log 2 3 (about 1. it changes row-to-row. Ask Question Asked 9 years, skipping of several line and start reading only numbers. If you are using nedit, there are two helpful things you should do to get started. Have the user specify the number of elements in a molecule in a ﬁle. MATLAB - Arrays - All variables of all data types in MATLAB are multidimensional arrays. When going over this tutorial, you are recommended to implement the examples yourself and then run them in the MATLAB command window and carefully study the outcome and compare it to the code. My file is a. This document contains a tutorial on Matlab with a principal components analysis for a set of face images as the theme. This is the only function able to read numbers and text from a text file. MATLAB Users’ Guide Cleve Moler Department of Computer Science University of New Mexico November, 1980 Abstract MATLAB is an interactive computer program that serves as a convenient "laboratory" for computations involving matrices. Number of characters to read from the next line, specified as an integer. Image Processing and Counting Using MATLAB: This is fun project based on image processing with MATLAB, here we will come accross learing how to count the number of distinguishable objects in an image. To exclude the terminator, use fgetl. Unknown text on line number 496 of ASCII file MPP_STAT. You’ll learn about the sensors and actuators used in quadcopter control. The most time-consuming lines are displayed, along with time, time percentage, and line number. Below we discuss various situations you might encounter. The argument for the input() function is the message or prompt you want it to display. csv files, reading text and numbers in a. Knapsack problem. An m-file, or script file, is a simple text file where you can place MATLAB commands. This MATLAB function creates variables by reading column-oriented data from a file. Write binary data to file. We're going to create simple MATLAB m-files to talk to our Arduino board. txt, use fopen to open the file. The size argument of fscanf() can be a scalar or a vector of length 2, but it cannot be a vector with more than 2 element such as [1 1:2:inf]. Getting Help in MATLAB. Sally Type1 12. Write a matlab program that takes a number from the user as an input and outputs whether the number is perfect or not. This tutorial is a follow-up article on how to read from an Excel file from Matlab. The first method described below is perhaps the simplest and most powerful, but is available only for Matlab 5 and 6. Exercises for MATLAB Course 1. Documentation more suitable for a novice is available on-line or in bookstores. Matlab it has a text editor as well. MATLAB understands that receiving only one argument actually means the user is telling the program to use the same number of grid lines and spacings for the "X" and "Y" values. Use the function name isevenorodd. read matrix from txt. " This should put lines of code on the left hand side of your screen. What spurred me into writing matlab-prettifier is that none of the existing tools do a great job at replicating the syntax highlighting of the Matlab editor, and I think Matlab beginners learn more effectively if they're exposed to code that is highlighted in a consistent manner, whether is be in the Matlab editor or in a PDF. In my last post I presented Matlab code to synthesize multiplierless FIR filters using Canonic Signed Digit (CSD) coefficients. However, using calculus, the volume of a cone is the integral of an infinite number of infinitesimally thin circular disks of thickness dx. txt, which reads the line including the newline character. Matlab it has a text editor as well. Writing formatted text to files is demonstrated. You can get the first line as g{1}{1}, the second as g{1}{2} and so on. I have been able to open the file in Matlab using the fopen command however I am having a hard time calculating the total number of lines in the file. Manually search and replace ' + ' and ' - ' in each file outside matlab. [tline,count] = fgets(obj) returns the number of values read to count. Sometimes the text files I need to read have an irregular format, i. Knapsack problem. Wait for user response. Line 1 - Condition is true Line 2 - Condition is true Line 3 - Condition is not true Line 4 - Condition is true Functions for Logical Operations. However, there is not always. Using lines of code to compare a 10,000-line project to a 100,000-line project is far more useful than when comparing a 20,000-line project with a 21,000-line project. (which should not be read) and numbers longer. At line-1 and Col-1 : 103. In addition to the options supported by strread, this function supports two more: "headerlines": The first value number of lines of filename are skipped. I read about textread but the format in this way should be. would result in a two row, three column matrix. Contains nice, brief summaries of matlab functionality, with references on where to go to get more verbose explanations. I have a text file with an header lines contains names and numbers. If you are using nedit, there are two helpful things you should do to get started. 0 // Purpose: The purpose of this program is to read in a set of test names and // limits. And I need to get everything out in program way not user hand writing and not by find and replace in word :) Right now i get one cell with all the numbers and a lot of blank cells, and now i am trying to recreate a csv matrix from a string object. Ignore the program, what's important is to use fgetl ,I include some comment for you in the code, just wanna emphasis that first time you use fgetl, it reads the first line, next time you use it it will read the second line, so you don't have to have a counter for the lines, unless you want to save the lines like I did and I assigned a variable. It can be used in. This can be useful for a variety of things but when I first learned about it, I was a bit confused by how the axes seem to be flipped sometimes when you do this. read audio signal. Read Particular Line Number from String-Num Text File. Select the "Preferences" button with your mouse and select "Show Line Numbers. A horizontal line is perpendicular to a vertical line, whose points all share the same x-value. Compare the output by examining the lengths of the lines returned by the fgetl and fgets functions. A read operation with fread blocks access to the MATLAB command line until:. Here is the matlab documentation for textscan which gives a lot more details. MATLAB has a fairly good on-line help, type: help commandname. By "Matlab (ASCII)" format, we mean an ASCII text file, each line of which contains either two, three, or four numbers. Intro to MATLAB March 9, 2014 Looping Statements (for) • Looping statements are much less common than in low level languages. Similarly, any text on a line following a % can contain textual comments and not Matlab commands. Matlab, on the other side, will do the rest of the job: a script will be run, and at a fixed frequency, will send the Temperature reading request string to Arduino, and will read back the temperature value sent to the serial buffer plotting it in a real time graph Temperature vs Time. Even for supercomputer users, MATLAB can be a valuable environment in. ,, the minimum number of characters necessary to display the % not on the same line. The function behaves like strread except it works by parsing a file instead of a string. opts = detectImportOptions(filename) locates a table in a file and returns the import options for importing the table. This list includes image processing projects using MATLAB, MATLAB projects for ECE students, digital signal processing projects using MATLAB, etc. Now you should see b= 3 10) Go back to the Workspace window and check that b is indeed in your workspace. MATLAB - Data Output - Data export (or output) in MATLAB means to write into files. Matlab-Scilab equivalents. MATLAB GUIs for Data Analysis In addition to the various MATLAB functions for performing data analysis, MATLAB provides four graphical user interfaces (GUIs) that facilitate common data-analysis tasks. I have This image which is basically made of sloped lines (almost horizontal and parallel) I tried exactly the code in matlab documentation to detect those lines (except the rotation part) but I got a very strange result (vertical lines detected and no single horizontal line!): I really can't find explanation of this output. line_in = fgets(fid) % read line including newline character. Number of lines in a txt file (empty lines Learn more about txt file, lines, read data MATLAB. There are a few functions that aren’t implemented, for example condest or to do with specific missing Octave functionality (gui, dll, java, activex, dde, web, and serial functions). (which should not be read) and numbers longer. (Note: textread can also read files with multiple columns of data). On-line Help(!) MATLAB provides on-line help for all built-in functions and commands. Without reading the characters or lines, you can't tell how many times the newline character would appear, unless the creator of the text file put that information in the headerline information. The ternary numeral system (also called base 3) has three as its base. Diary files are activity logs of your MATLAB session. Structures are similar to arrays in that. Textread is designed to read a list of numbers, one per line. This demo teaches you how to use transfer learning to re-train AlexNet, a pretrained deep convolutional neural network (CNN or ConvNet) to recognize snack food such as hot dogs, cup cakes and apple pie. Here I want to use that function to illustrate a few properties of CSD numbers. Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. CME 102 Matlab Workbook 2008-2009 3/55 1 Matlab Basics 1. For numeric data, this is the number of values read.