SlideShare a Scribd company logo
MATLAB ASHOKA BAIRWA
Practical –6
Aim: Write a MATLAB code for importing data from external files.
Theory: importdata
Load data from file
Syntax : A = importdata(filename)
A = importdata('-pastespecial')
A = importdata(___,delimiterIn)
A = importdata(___,delimiterIn,headerlinesIn)
[A,delimiterOut,headerlinesOut] = importdata(___)
A = importdata(filename)
A = importdata(filename)
loads data into array A.
The output, A, is class uint8 because the helper function, imread, returns empty results
for colormap and alpha.
MATLAB ASHOKA BAIRWA
A = importdata('-pastespecial')
A = importdata('-pastespecial')
loads data from the system clipboard rather than from a file.
Copy the following lines to the clipboard. Select the text, right-click, and then select Copy.
1,2,3
4,5,6
7,8,9
Import the clipboard data into MATLAB® by typing the following.
MATLAB ASHOKA BAIRWA
A = importdata(___,delimiterIn)
A = importdata(___,delimiterIn):
interprets delimiterIn as the column separator in ASCII file, filename, or the clipboard data.
You can use delimiterIn with any of the input arguments in the above syntaxes.
delimiterIn — Column separator character
character vector | string scalar
Column separator character, specified as a character vector or a string scalar. The default character
is interpreted from the file. Use 't' for tab.
Example: ','
Example: ' '
Data Types: char | string
headerlinesIn — Number of text header lines in ASCII file
nonnegative scalar integer
Number of text header lines in the ASCII file, specified as a nonnegative scalar integer. If you do not
specify headerlinesIn, the importdata function detects this value in the file.
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
delimiterOut — Detected column separator in the input ASCII file
character vector
Detected column separator in the input ASCII file, returned as a character vector.
headerlinesOut — Detected number of text header lines in the input ASCII file
integer
Detected number of text header lines in the input ASCII file, returned as an integer.
filename — Name and extension of file to import
character vector | string scalar
Name and extension of the file to import, specified as a character vector or a string scalar.
If importdata recognizes the file extension, it calls the MATLAB helper function designed to import
the associated file format (such as load for MAT-files or xlsread for spreadsheets).
Otherwise, importdata interprets the file as a delimited ASCII file.
For ASCII files and spreadsheets, importdata expects to find numeric data in a rectangular form
(that is, like a matrix). Text headers can appear above or to the left of the numeric data, as follows:
• Column headers or file description text at the top of the file, above the numeric data.
• Row headers to the left of the numeric data.
MATLAB ASHOKA BAIRWA
Example: 'myFile.jpg'
Data Types: char | string
A = importdata(___,delimiterIn,headerlinesIn)
A = importdata(___,delimiterIn,headerlinesIn)
loads data from ASCII file, filename, or the clipboard, reading numeric data starting from
line headerlinesIn+1.
MATLAB ASHOKA BAIRWA
[A,delimiterOut,headerlinesOut] = importdata(___)
[A,delimiterOut,headerlinesOut] = importdata(___)
additionally returns the detected delimiter character for the input ASCII file
in delimiterOut and the detected number of header lines in headerlinesOut, using any of
the input arguments in the previous syntaxes.

More Related Content

Similar to Matlab practical ---6.pdf

Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
ParveenShaik21
 
Importing data in Oasis Montaj
Importing data in Oasis MontajImporting data in Oasis Montaj
Importing data in Oasis Montaj
Amin khalil
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
MathewJohnSinoCruz
 
Python help- You will be writing an encryption program for an IT compa.pdf
Python help- You will be writing an encryption program for an IT compa.pdfPython help- You will be writing an encryption program for an IT compa.pdf
Python help- You will be writing an encryption program for an IT compa.pdf
ChristopherkUzHunter
 
Reading_csv.pptx
Reading_csv.pptxReading_csv.pptx
Reading_csv.pptx
OpOp39
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
faithxdunce63732
 
Pandas csv
Pandas csvPandas csv
Pandas csv
Devashish Kumar
 
Ch03_stacks_and_queues.ppt
Ch03_stacks_and_queues.pptCh03_stacks_and_queues.ppt
Ch03_stacks_and_queues.ppt
OliverKane3
 
Kafka Summit NYC 2017 - Easy, Scalable, Fault-tolerant Stream Processing with...
Kafka Summit NYC 2017 - Easy, Scalable, Fault-tolerant Stream Processing with...Kafka Summit NYC 2017 - Easy, Scalable, Fault-tolerant Stream Processing with...
Kafka Summit NYC 2017 - Easy, Scalable, Fault-tolerant Stream Processing with...
confluent
 
interenship.pptx
interenship.pptxinterenship.pptx
interenship.pptx
Naveen316549
 
Presention programming
Presention programmingPresention programming
Presention programming
saleha iqbal
 
Import Data using R
Import Data using R Import Data using R
Import Data using R
Rupak Roy
 
Unit 3_Numpy_VP.pptx
Unit 3_Numpy_VP.pptxUnit 3_Numpy_VP.pptx
Unit 3_Numpy_VP.pptx
vishnupriyapm4
 
Matlab strings
Matlab stringsMatlab strings
Matlab strings
pramodkumar1804
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
NishantKumar1179
 
Data structures "1" (Lectures 2015-2016)
Data structures "1" (Lectures 2015-2016) Data structures "1" (Lectures 2015-2016)
Data structures "1" (Lectures 2015-2016)
Ameer B. Alaasam
 
Python Pandas
Python PandasPython Pandas
Python Pandas
Sunil OS
 
Pa1 session 5
Pa1 session 5Pa1 session 5
Pa1 session 5
aiclub_slides
 
Unit 3_Numpy_Vsp.pptx
Unit 3_Numpy_Vsp.pptxUnit 3_Numpy_Vsp.pptx
Unit 3_Numpy_Vsp.pptx
prakashvs7
 

Similar to Matlab practical ---6.pdf (20)

Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
 
Importing data in Oasis Montaj
Importing data in Oasis MontajImporting data in Oasis Montaj
Importing data in Oasis Montaj
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
 
Python help- You will be writing an encryption program for an IT compa.pdf
Python help- You will be writing an encryption program for an IT compa.pdfPython help- You will be writing an encryption program for an IT compa.pdf
Python help- You will be writing an encryption program for an IT compa.pdf
 
Reading_csv.pptx
Reading_csv.pptxReading_csv.pptx
Reading_csv.pptx
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
 
Pandas csv
Pandas csvPandas csv
Pandas csv
 
Ch03_stacks_and_queues.ppt
Ch03_stacks_and_queues.pptCh03_stacks_and_queues.ppt
Ch03_stacks_and_queues.ppt
 
Kafka Summit NYC 2017 - Easy, Scalable, Fault-tolerant Stream Processing with...
Kafka Summit NYC 2017 - Easy, Scalable, Fault-tolerant Stream Processing with...Kafka Summit NYC 2017 - Easy, Scalable, Fault-tolerant Stream Processing with...
Kafka Summit NYC 2017 - Easy, Scalable, Fault-tolerant Stream Processing with...
 
interenship.pptx
interenship.pptxinterenship.pptx
interenship.pptx
 
Presention programming
Presention programmingPresention programming
Presention programming
 
Import Data using R
Import Data using R Import Data using R
Import Data using R
 
Unit 3_Numpy_VP.pptx
Unit 3_Numpy_VP.pptxUnit 3_Numpy_VP.pptx
Unit 3_Numpy_VP.pptx
 
Data structures
Data structures Data structures
Data structures
 
Matlab strings
Matlab stringsMatlab strings
Matlab strings
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
 
Data structures "1" (Lectures 2015-2016)
Data structures "1" (Lectures 2015-2016) Data structures "1" (Lectures 2015-2016)
Data structures "1" (Lectures 2015-2016)
 
Python Pandas
Python PandasPython Pandas
Python Pandas
 
Pa1 session 5
Pa1 session 5Pa1 session 5
Pa1 session 5
 
Unit 3_Numpy_Vsp.pptx
Unit 3_Numpy_Vsp.pptxUnit 3_Numpy_Vsp.pptx
Unit 3_Numpy_Vsp.pptx
 

More from Central university of Haryana

MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdfMATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
Central university of Haryana
 
Matlab practical ---2.pdf
Matlab practical ---2.pdfMatlab practical ---2.pdf
Matlab practical ---2.pdf
Central university of Haryana
 
Matlab practical ---1.pdf
Matlab practical ---1.pdfMatlab practical ---1.pdf
Matlab practical ---1.pdf
Central university of Haryana
 

More from Central university of Haryana (20)

Practical --2..pdf
Practical --2..pdfPractical --2..pdf
Practical --2..pdf
 
Practical --1.pdf
Practical --1.pdfPractical --1.pdf
Practical --1.pdf
 
ML Lab.docx
ML Lab.docxML Lab.docx
ML Lab.docx
 
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdfMATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
 
LittleBookOfRuby.pdf
LittleBookOfRuby.pdfLittleBookOfRuby.pdf
LittleBookOfRuby.pdf
 
all matlab_prog.pdf
all              matlab_prog.pdfall              matlab_prog.pdf
all matlab_prog.pdf
 
Practical13.docx
Practical13.docxPractical13.docx
Practical13.docx
 
Practical 111.docx
Practical 111.docxPractical 111.docx
Practical 111.docx
 
Matlab Practical--11.pdf
Matlab Practical--11.pdfMatlab Practical--11.pdf
Matlab Practical--11.pdf
 
Matlab Practical--11.docx
Matlab Practical--11.docxMatlab Practical--11.docx
Matlab Practical--11.docx
 
Matlab Practical--9.docx
Matlab Practical--9.docxMatlab Practical--9.docx
Matlab Practical--9.docx
 
Matlab Practical-- 12.pdf
Matlab Practical-- 12.pdfMatlab Practical-- 12.pdf
Matlab Practical-- 12.pdf
 
Matlab practical ---9.pdf
Matlab practical ---9.pdfMatlab practical ---9.pdf
Matlab practical ---9.pdf
 
Matlab practical ---7.pdf
Matlab practical ---7.pdfMatlab practical ---7.pdf
Matlab practical ---7.pdf
 
Matlab practical ---5.pdf
Matlab practical ---5.pdfMatlab practical ---5.pdf
Matlab practical ---5.pdf
 
Matlab practical ---4.pdf
Matlab practical ---4.pdfMatlab practical ---4.pdf
Matlab practical ---4.pdf
 
Matlab practical ---3.pdf
Matlab practical ---3.pdfMatlab practical ---3.pdf
Matlab practical ---3.pdf
 
Matlab practical ---2.pdf
Matlab practical ---2.pdfMatlab practical ---2.pdf
Matlab practical ---2.pdf
 
Matlab practical ---1.pdf
Matlab practical ---1.pdfMatlab practical ---1.pdf
Matlab practical ---1.pdf
 
Matlab practical --8.pdf
Matlab practical --8.pdfMatlab practical --8.pdf
Matlab practical --8.pdf
 

Recently uploaded

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 

Recently uploaded (20)

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 

Matlab practical ---6.pdf

  • 1. MATLAB ASHOKA BAIRWA Practical –6 Aim: Write a MATLAB code for importing data from external files. Theory: importdata Load data from file Syntax : A = importdata(filename) A = importdata('-pastespecial') A = importdata(___,delimiterIn) A = importdata(___,delimiterIn,headerlinesIn) [A,delimiterOut,headerlinesOut] = importdata(___) A = importdata(filename) A = importdata(filename) loads data into array A. The output, A, is class uint8 because the helper function, imread, returns empty results for colormap and alpha.
  • 2. MATLAB ASHOKA BAIRWA A = importdata('-pastespecial') A = importdata('-pastespecial') loads data from the system clipboard rather than from a file. Copy the following lines to the clipboard. Select the text, right-click, and then select Copy. 1,2,3 4,5,6 7,8,9 Import the clipboard data into MATLAB® by typing the following.
  • 3. MATLAB ASHOKA BAIRWA A = importdata(___,delimiterIn) A = importdata(___,delimiterIn): interprets delimiterIn as the column separator in ASCII file, filename, or the clipboard data. You can use delimiterIn with any of the input arguments in the above syntaxes. delimiterIn — Column separator character character vector | string scalar Column separator character, specified as a character vector or a string scalar. The default character is interpreted from the file. Use 't' for tab. Example: ',' Example: ' ' Data Types: char | string headerlinesIn — Number of text header lines in ASCII file nonnegative scalar integer Number of text header lines in the ASCII file, specified as a nonnegative scalar integer. If you do not specify headerlinesIn, the importdata function detects this value in the file. Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 delimiterOut — Detected column separator in the input ASCII file character vector Detected column separator in the input ASCII file, returned as a character vector. headerlinesOut — Detected number of text header lines in the input ASCII file integer Detected number of text header lines in the input ASCII file, returned as an integer. filename — Name and extension of file to import character vector | string scalar Name and extension of the file to import, specified as a character vector or a string scalar. If importdata recognizes the file extension, it calls the MATLAB helper function designed to import the associated file format (such as load for MAT-files or xlsread for spreadsheets). Otherwise, importdata interprets the file as a delimited ASCII file. For ASCII files and spreadsheets, importdata expects to find numeric data in a rectangular form (that is, like a matrix). Text headers can appear above or to the left of the numeric data, as follows: • Column headers or file description text at the top of the file, above the numeric data. • Row headers to the left of the numeric data.
  • 4. MATLAB ASHOKA BAIRWA Example: 'myFile.jpg' Data Types: char | string A = importdata(___,delimiterIn,headerlinesIn) A = importdata(___,delimiterIn,headerlinesIn) loads data from ASCII file, filename, or the clipboard, reading numeric data starting from line headerlinesIn+1.
  • 5. MATLAB ASHOKA BAIRWA [A,delimiterOut,headerlinesOut] = importdata(___) [A,delimiterOut,headerlinesOut] = importdata(___) additionally returns the detected delimiter character for the input ASCII file in delimiterOut and the detected number of header lines in headerlinesOut, using any of the input arguments in the previous syntaxes.