Skip to main content
1-Visitor
October 21, 2010
Question

Export in .txt

  • October 21, 2010
  • 7 replies
  • 4357 views

Hi everyone,

This is my first post and I hope you can help me.

I have a funtion:

f(x) = 2x and x = 1,2,3,4

I want using a Push Buttom (insert control) export the matrix x, f(x) in a .txt file.

This is posible? what is the script for this?

Hope you can help me.

Thanks in advance

Daniel

7 replies

1-Visitor
October 22, 2010

What do you want to use the push button for?

Can you not just write the data to a *.txt file as shown in my example?

Mike

1-Visitor
October 23, 2010

Thank you for the answer...

I think in a botton to export the file when I want and not every think the soft calculate, but your answer help me.

I will explain exactly what I want to do.

I have a funtion:

f(x) =2x + 10

And x=1,2,3,4

I want export a .txt with this information:

12 1 $

14 2 $

16 3 $

18 4 $

I am a structural engineer and I need a file like this to import some information in to a structural soft.

All the Best

1-Visitor
October 24, 2010
12 1 $

14 2 $

16 3 $

18 4 $

Does it have to be in this exact format, because I'm pretty sure if the $ symbol is included the format will have to be changed to a string.

Mike

1-Visitor
October 24, 2010

Hi,

After tried a lot struff, I did what I want to.

The only thing I will like to do, is with a buttom "enable evaluation" and "disable evaluation" of the .txt, so the file only will export when I want it.

Here is the file. Probably you can do the same in one or two steps, but thats the only way I could it think.

If you want to change it be my guest...

All the best

19-Tanzanite
October 24, 2010
The only thing I will like to do, is with a buttom "enable evaluation" and "disable evaluation" of the .txt, so the file only will export when I want it.

There is no way to make a button do that for the file output control. At least, no way that wouldn't be at least 100 times as much work as modifying the file write button I just posted!

However, since you seem to be happy adding the $ symbol to the matrix Mathcad, and are currently using a tab as a delimiter, you can just use the button as is to write your file instead of the file output component.