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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!