Skip to main content
1-Visitor
December 18, 2014
Question

Reading ground motion data from txt file

  • December 18, 2014
  • 4 replies
  • 1754 views

Hello

I want to import the ground motion data from txt file. I have to escape first few lines of text in txt file then, read only the numeric value.

Could you guide me how can I do it?

Regards,

Keshab

4 replies

24-Ruby IV
December 18, 2014

You can use the following built-in functions:

  • READPRN("file") - returns an array containing the contents of the ASCII file;
  • READFILE("file", "type", [colwidths], [rows], [cols], [emptyfill]) - returns an array containing the data in file.

You can find more information about the work of these functions in the "Mathcad Help" file (key F1😞

Pic_1.png

P.S. For the future - for new questions create a new discussion please.

1-Visitor
December 18, 2014

Go to insert>component>import wizard

choose delimited text in the box and browse for your text file. you will see choices for starting row, range of columns and rows to read and so on. once all you want is selected, you come out of the box and give a name to the data.

amit

ksharma-21-VisitorAuthor
1-Visitor
December 18, 2014

I think there is no inset tab/menu in MathCAD Prime 3.0

24-Ruby IV
December 19, 2014