Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MATLAB for Machine Learning

You're reading from   MATLAB for Machine Learning Practical examples of regression, clustering and neural networks

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781788398435
Length 382 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Pavan Kumar Kolluru Pavan Kumar Kolluru
Author Profile Icon Pavan Kumar Kolluru
Pavan Kumar Kolluru
Giuseppe Ciaburro Giuseppe Ciaburro
Author Profile Icon Giuseppe Ciaburro
Giuseppe Ciaburro
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Getting Started with MATLAB Machine Learning FREE CHAPTER 2. Importing and Organizing Data in MATLAB 3. From Data to Knowledge Discovery 4. Finding Relationships between Variables - Regression Techniques 5. Pattern Recognition through Classification Algorithms 6. Identifying Groups of Data Using Clustering Methods 7. Simulation of Human Thinking - Artificial Neural Networks 8. Improving the Performance of the Machine Learning Model - Dimensionality Reduction 9. Machine Learning in Practice

Exporting data from MATLAB

Many of the functions we have used to import data into MATLAB have a corresponding function that allows us to export data. At the beginning of the chapter, we learned to save our data for later use with the save command:

>> save filename.mat

Remember, this command saves all contents of the workspace in a compressed file with a .mat extension, called a MAT-file.

The dlmread() function allows us to handle text files with a specified delimiter. We can use this function to write a matrix to an ASCII-delimited file. To test the function, we start from a matrix of random numbers:

>> MyMatrix = rand(5)
MyMatrix =
0.7577 0.7060 0.8235 0.4387 0.4898
0.7431 0.0318 0.6948 0.3816 0.4456
0.3922 0.2769 0.3171 0.7655 0.6463
0.6555 0.0462 0.9502 0.7952 0.7094
0.1712 0.0971...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime