How to Split one Large Matrix Into Smaller Matrices
Show older comments
Hello,
I have some magnetic field coil data that I need to analyze. The issue is that the data format of the text file has three columns as shown in the image below. 

When I import it to MatLab it gives me a 150081x5 matrix and that's no good because although in the image the x-coordinate is only -270, it goes up by 1.8 until it reaches 270. Somehow I need to take all of the data points for Z and Bx and that corespond to x=-270 and make them a 150081x1 matrix where the 1 is -270. Eventually the endgoal is to print 2D heatmaps of these values so that we can look at the homegeneity of the magnetic fields at certain locations inside the plane.
What would be the best way to go about taking my currently ugly data and putting it into a usable format?
Answers (1)
KALYAN ACHARJYA
on 29 Aug 2019
Edited: KALYAN ACHARJYA
on 29 Aug 2019
What would be the best way to go about taking my currently ugly data and putting it into a usable format?
One Way:
data_file=importdata('David.txt');
data_main=data_file.data;

Now do whatever you want with data_main, having 15080 rows and 4 cloumns (considering serial numbers also as a column). You can easily acess any rows or column data from data_main.
Hope you get the sufficient hints!
1 Comment
David Bloom
on 29 Aug 2019
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!