Items tagged with file file Tagged Items Feed

Hi:
i solved nonlinear ode in terms of t (y(t)) with dsolve command,how i will evaluate value function(y(t)) in points t=0..1 with delta t=0.01 and results(t and y(t)) inside a excel file?

eq := diff(y(t), t, t)-y(t)^2 = 1
res := dsolve({eq, y(0) = 0, (D(y))(0) = 0}, {y(t)}, numeric)

 

Hi, 

 

  I would like to a string of characters to a file. For example,

***

str:="hello world";
WriteFile[APPEND]("D:\\output3.txt", str);

***

 

  It doesn't work. I did not get output3.txt :(  How should I do, to write a string of characters, such as "hello world" to a file?

Thank you

Dear all,

I want to compute the charateristic polynomials of some matrices (the number of matrices is more than 10000), and write the coefficients of the resulting polynomials to a text file. The entries of the given matrices are stored in a text file. More specifically, suppose that M_1, M_2 and M_3 are three matrices, and the entries of them are stored in a text file named "data.txt" in the following form:

1 2 3

4 5 6

7 8 9

 

1 -1 0

2 3 6

-3 0 2

 

2 1 -1

1 -1 -2

0 1 2

The resulting output file should be of the following format:

1, -15, 18, 0

1, -6, 13, -28

1, -3, 1, 3

I don't know how to repeatedly read the data from the given text file. I think the procedure should be as follows.

>restart:

>with(LinearAlgebra):

>with(FileTools:-Text):

>fid:=Open("data.txt"):

>fid_1:=Open("data_1.txt"): #data_1 is the output file

>ReadFile(fid); #since the number of matrices is very large, I want the data to be read once

>numlines:=CountLines(fid);

>for i from 1 to numlines do

       here I need repeatedly read the data to a matrix M (I don't know how to do);

       P:=CharacteristicPolynomial(M,x);

       writedata[APPEND]("data_1.txt",map(i-> coeff(p, x, i), [seq(i, i = 0 .. degree(p, x))]));  #this statement cannot write the coefficients of a polynomial in the same row

>end do;

>Close(fid):

>Close(fid_1):

Now as I'm pretty new to Maple, I don't know any better and can't seem to get any information out of the help documents. 

Thanks a lot.

At the moment, I am using

>writeto("Result1.txt");

> printf(StringTools[FormatTime]("%c\n"));
Thu Jul 31 14:28:08 2014

# lots of things here

# lots of things here

# lots of things here

>writeto(terminal);

To write a time and date stamp into my result1.txt file.

I understand that I can't write : into file names, but is there a way to writeto file using a more informative file name with date and time, such as,

Result_Thu Jul 31 14-28-08 2014.txt

 

Is that something can be easily formatted?

casper

 

Hi :)

I have a Macbook Air running on OS X Mavericks. I am using Maple16.

I created a procedure, which construct two keys. Each of those keys consists of a list containing two elements. That is two primes. So at the end of my procedure I included the following code in order to write my data to a file:

> pkey := fopen(keyFile, WRITE, TEXT);
                      pkey:=1
> writedata(pkey, publicKey);
> fclose(pkey);

The problem is that I can't find the created file "keyFile".

So I tried breaking the problem down. I created a List and wanted to write that list in a textfile in a specific folder:

> L := [1, 2, 3];
> fd := fopen("Users\\****\\Desktop\\fdtest.txt", WRITE, TEXT);
                              fd:=1
> fprintf(fd, "This is a test");
                              14
> fclose(fd);

But this did not work either. It seems like the file fdtest.txt never gets created. This happens in general when I use fopen().

Thank you in advance for your help

Schloemilch

 

 

Hello,

sometimes I observe extreme delays when simply entering a variable name like fooBar; right after starting a Maple session. This happens when the current directory contains a file with that name, because Maple automatically loads this file.

For example, if I create an empty file fooBar.m and start a Maple session,

> fooBar;
Error, `./fooBar.m` is an incorrect or outdated .m file

raises an error. More often however, I have some huge Maple files in the working directory and whenever I use (by chance) a variable name in the Maple session that matches a filename, Maple tries to load the corresponding file.

Is there a documentation of this behaviour and a possibility to stop this automatic loading of files?

Thanks,

Erik

Is it possible to set maple to fill in a header or footer for every new document I make?

Now i have to do it fot each new file by hand: 

View => Header footer ..=> 

 - select custom  - goto tab cusom headers put in the left textfield "&[File] pag. &[Page]/&[Pages]"

Hi,

I'm new here and I couldn't find similar problem in this forum.

I want to use variable (red marked) with unit definite integrals but it doesn't work. I put the file with units and file without units (to check correct solution) in this post.

What to do?

Files:

01_referat(units).mw

01_referat(without_u.mw

Hi there,

i want to generate some plots in files in this example:


this code doesn't work. but without restart; it works fine. i passed 2 days to figure out that "restart;" was the problem.

my questions are :

1. why i have to eliminate the first line of restart;

2. how can i save my files in a directory that is in the current directory. For example i have a directory in current directory named "plotFILES".

thanks in advance for your help

Unable to open file...

September 03 2013 maypay 10

Hi, I’ve recently begun using Maple 16. I just discovered a problem when trying to open my saved files. I can’t open them directly form the folder where they are saved, I get a Message saying: File XXX.mw could not be found, please select another file. I can accsess the same file through the recent files form within the application.

It is not a shortcut, but the original file I'm trying to open.
If it matters, I'm using windows 8 

File could not be found...

July 22 2013 DavidR 0

I recently purchased a new MacBook Pro (retina) with Mountain Lion and found that my Maple 12 programs would not run.  So I updated to Maple 16.  Initially all seemed to work well.  But now when i try to open a Maple .mw file, I get the message

"File acm23test.mw could not be found.  Please select a different file."

What has happened and how can I get my programs working again?

DavidR

Hi,

 

  I have a .txt file created from maple. I want to read some data using maple. The content of that .txt file is

 

....

some word,                     -7
                    -0.25333 10

...

some word,

I created a maplet in maple using the following codes:

> restart:
> with(Maplets[Elements]):
> m5:=Maplet(
> Window('title'="Turev",
> [
> ["Fonksiyon:",TextField['Y1']()],
> ["Turev Degiskeni:",TextField['Y2'](3)],
> TextBox['TB1']('editable'='false',3..40),
> [Button("Turevi Hesapla",Evaluate('TB1'='diff(Y1,Y2)')),
> Button("Tamam",Shutdown(['Y1','Y2','TB1'])),
> Button("Temizle",SetOption('Y1'=""))]

... is finance.dll missing in Maple16 (64 bit), as it was in Maple15 (64 bit), so you have to install the 32 bit version instead?

Is it possible to move the finance.dll-file from Maple16(32-bit) to Maple16(64-bit)?

Jestrup

Suppose I have a file of text that I would like to read into a Maple (16) worksheet as a string. (I have in mind encrypting the string using the RSA encryption scheme.)

If I paste the text directly into the worksheet and surround it by ",  I have no problem, but if I try to read, for example, a file some_text.txt using a command like

     read("C:\\Users\\MyName\\Desktop\\some_text.txt");

1 2 Page 1 of 2