- Use readtable function to read csv file into matlab as a table.
- Get the required column of the table using tablevariablename.columnname
how to select a row of data from a csv file that is imported into Matlab?
59 views (last 30 days)
Randy Chen on 15 Nov 2020
I need to read in a csv file and utilize a function that is built into matlab:
[a,ecc,incl,RAAN,argp,nu,truelon,arglat,lonper] = ijk2keplerian(r_ijk, v_ijk)
Here is what my csv file looks like:
how should I import this csv file into matlab and then make a set of row vectors r = [rx,ry,rz] and v = [vx,vy,vz] such that I can use the above function directly?
I also want to create a plot of all six elements returned by the ijk2keplerian(r_ijk, v_ijk) function vs time. How should I make a for loop such that the function ijk2keplerian(r_ijk, v_ijk) returns all 6 elements into lists so I can plot each of the six elements vs time (on the same plot with legend)??
Sai Veeramachaneni on 17 Nov 2020
Here are the few hints.
[a,ecc,incl,RAAN,argp,nu,truelon,arglat,lonper] = ijk2keplerian(r, v)