Question
MATLAB Code I am trying to write a code that inputs coordinate data from excel and stores each row of x,y,z coordinates into its own
MATLAB Code
I am trying to write a code that inputs coordinate data from excel and stores each row of x,y,z coordinates into its own variable.
So far I have this which brings in all my data and stores into a matrix containing all three coordinate points.
[num,txt,raw] = xlsread('Excel.xlsx');
x = num(:,1);
y = num(:,2);
z = num(:,3);
p = [x, y, z];
I am unsure of how to extract each row in order to have each set of coordinate points be stored in its own x,y,z variable.
What I have:
p =
1.0e+06 *
XYZ
1.744644127200000, -4.014801833900000, 4.623258965200001
1.671483114500000, -3.987389898500000, 4.673416349999999
What I would like:
Cooridnate 1 = 1.744644127200000, -4.014801833900000, 4.623258965200001
Cooridnate 2 = 1.671483114500000, -3.987389898500000, 4.673416349999999
There is also an unknown number of coordinates to consider.
Thank you very much!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started