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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! 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.

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(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
25-Diamond I
(To:ppal)

Here is a utility function which might come handy

B.PNGB2.PNG

Werner_E
25-Diamond I
(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

Announcements

Top Tags