Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Dear all,
I am a beginner of using Mathcad 15 and I have a very basic question regarding to the data import and solving an equation. I try to simplify my questions: I have a text file containing two columns of data with column 1 is "a" and column 2 is "b". I would like to solve the equation a*x^2 - b = 0 to get x value. This means once I import (a0, b0) I have x0 export and so on so forth. I would like to export all x values into a file. Can someone please tell me how I can do this? Thanks a lot in advance.
Best regards,
Chien-Lung
Solved! Go to Solution.
You can use the file input and output components or you could use one of the File output functions.
For example, to output the x values, go the main menu and select Insert/Data/File Output. This will bring up a dialog box thal allows you to specify the file format that you want (eg, tab delimited or comma seperated), and enter a file name. When you finish with the dialog, it will create a file output "component" with a placeholder for the array name. I've shown what the dialog box looks like below and an example of saving the array x. If you want to read data, then you should choose Insert/Data/File Input, which will lead you through a similar process, the main difference being that the component's placeholder takes the form of a standard definition (:=) - see below for example, reading the x value file into a variable y.
Look up the various forms of file input/output function in Help. The example below uses READFILE to copy the x value file into variable z:
Stuart
Thank you for the prompt help!!