cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Reading Excel CSV in Mathcad Prime 5.

ppal
17-Peridot

Reading Excel CSV in Mathcad Prime 5.

I have a set of data that I am importing from excel.

 

 

I am reading data from the file. It is in the format. "[79.34029,63.57957]" (There is a column of data)

 

I want to convert this to 79.34029,63 at an angle of 63.57957 degrees.

 

I tried reading it and used str2num but it did not "like" my approach.

 

Thanks for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:ppal)

Here are two functions which build the whole table. One without and the other with units applied. You can't demand for specific units for each column when displaying the full table but you may display every column with the unit you'd like to see (degree e.g.)

B1.pngB2.png

B3.png

View solution in original post

3 REPLIES 3
LucMeekes
23-Emerald III
(To:ppal)

Ideally built-in function READFILE should be doing this, but I'm afraid your datafile is too complicated for READFILE.

Consider using the funcion Vec2vec() on each of your "[....]" elements.

See attached Prime 4 file.

 

If you want you can multiply the second element of the Vec2vec result array with deg, to get them look like angles.

 

Success!
Luc

Werner_E
24-Ruby V
(To:ppal)

Here is a utility function which might come handy

B.PNGB2.PNG

Werner_E
24-Ruby V
(To:ppal)

Here are two functions which build the whole table. One without and the other with units applied. You can't demand for specific units for each column when displaying the full table but you may display every column with the unit you'd like to see (degree e.g.)

B1.pngB2.png

B3.png

Top Tags