segfault

145 Reputation

5 Badges

2 years, 113 days

MaplePrimes Activity


These are questions asked by segfault

Example code

printlevel :=1     

for indx1 from 1 by 1 to  3  do  

f[indx1] :=indx1;  

 end do;

This prints
f1:=1
f2:=2
f3:=3

How do I use the "save" command to save exactly the loop's results above to a file so that I can read the file later and execute it in another  maple worksheet.

The maple manual https://www.maplesoft.com/support/help/Maple/view.aspx? 

for "save"   contains no examples, and definately not how to save results of a loop using the save command. e.g. how do you append  with a file using the "save" command ?

Note: I dont need any help with reading the results, from the saved file, my question is only about writing the results with "save" command. The "save" command gives me the best results for reading files back into a speadsheet, and text file save routines just gives me ascii garbage and not the exact results in executable maple format as "save" does, saving exacltly what you see on screen. Therefore text save routines are useless to me.

Is it possible to configure newer maple versions to use a different file extension ?

I have a lot of  Maple 9 files  with .mw extension. I dont want them opened and saved by a later version as they are valuable and actually work better than later maple versions which throws unneccesary signum errors. The results are verified so the signum errors are bogus in the recent maple versions running the same file.

Particularly, can I configure e.g. Maple 2022 to save to a different file extension say .mww or similar rather than .mw so I can avoid destroying to original 9.5 files?

While these things are a walk in the park with languages like C and system administration languages like bash, the maple file IO is really a bit wanting

I tried, but nowhere in the manual could I find how to use a variable in a filename.

As an example with bash,   you can assign a value to a variable say Ver=01.

The program code contains the filename as
filename$Ver.txt,
and upon execution of the file saved, it is saved as filename01.txt .
Where it replaced the variable with its value in the saved file.

There seems to be no such thing in Maple I could find.
If it exists, it must be so obscure that normal manual searches cannot find it.

So, how do you save a file using a variable in the filename, which then uses the value of the variable in the saved filename. ?
This is basically a prerequisite e.g. for server based maple doing large datasets, so maple must be capable doing it.

Is it possible in maple to resume an asymptotic expansion from a specific order onwards.

To be more specific.

Let's assume that I have the asymptotic expansion to say Order 20 already calculated or can import it from file.

Is it possible for Maple to use the expansion I already have and immediately start calculating Order 21 onwards ?

This will save a lot of time for numerical  expansions that can take literally days to complete.

The local command is really horribly treated in the manual. Very difficult to figure out heads from tails.

What follows is Maple code to unprotect the metric tensor g_[], and alter the components. that part I figured out by trial and error where the manual fails to clearly describe how.

But, the problem I now have, is that the unprotected metric does not show the tensor "visual matrix" form anymore if I execute  g_[] . So it makes it all unusable.

How do I enter the unprotected and altered g_[] back into maple so it can be used to calculate the Ricci tensor, Einstein tensor and such ? I guess it will have to be protected again etc. ?

Here is the code


restart;
with(Physics);
g_[sc];
g_[];
_local(g_[]);
g_[1, 2] := 1;
g_[3, 3];
Physics:-g_[1, 1];
g_[1, 2];
Physics:-g_[1, 1];
g_[];
for x to 4 do
    for y to 4 do g_[x, y] := Physics:-g_[x, y]; end do;
end do;
g_[];


So the question is. How do you reverse a localalized metric back to being protected after you altered the metric ?

1 2 3 4 5 6 7 Page 3 of 8