PatrickT

Dr. Patrick T

2163 Reputation

18 Badges

16 years, 338 days

MaplePrimes Activity


These are replies submitted by PatrickT

@Alejandro Jakubi 

thanks Alejandro for your troubles!

The thing is that I have neither linux nor xp at work, where I have a licensed Maple, but I do have this tool,

http://www.microsoft.com/windows/virtual-pc/default.aspx

which can turn my Windows 7 into Windows XP, a strange thing to be doing in 2011 but I'll give it a try!

will report back any result,

thanks,

Patrick.

@Alejandro Jakubi 

thanks Alejandro for your troubles!

The thing is that I have neither linux nor xp at work, where I have a licensed Maple, but I do have this tool,

http://www.microsoft.com/windows/virtual-pc/default.aspx

which can turn my Windows 7 into Windows XP, a strange thing to be doing in 2011 but I'll give it a try!

will report back any result,

thanks,

Patrick.

Alejandro,

your point is valid, and until it is tried it is difficult to know which way things might go, but if the community of experts is so small that 2 branches could not be maintained, then Maple's future is bleak indeed...

an interesting point made by William Stein back in 2005,

"Not being able to check the code of a computer-based calculation is like not publishing proofs for a mathematical theorem," Stein said. "It's ludicrous."

http://www.labonline.com.au/news/8212-A-free-alternative-to-Matlab-Maple-Mathematica-and-Magma

 

Alejandro,

your point is valid, and until it is tried it is difficult to know which way things might go, but if the community of experts is so small that 2 branches could not be maintained, then Maple's future is bleak indeed...

an interesting point made by William Stein back in 2005,

"Not being able to check the code of a computer-based calculation is like not publishing proofs for a mathematical theorem," Stein said. "It's ludicrous."

http://www.labonline.com.au/news/8212-A-free-alternative-to-Matlab-Maple-Mathematica-and-Magma

 

If your worksheet contains a lot of calculations, like Matrices, Arrays, plots, etc. one way to free up some memory is to "unassign" those that you don't need, e.g. those variables created during intermediate steps. For instance, after I create a plot and export it, say the plot is named myPlot, then I execute myPlot:='myPlot'; and this frees up (some if not all?) the memory that had been allocated to it, you can free up a lot of memory this way. You can also use the palettes, under standard gui, to unassign variables, this way you can see how many variables are currently in use in your worksheet; unfortunately I don't think that there is currently a way to see from the palettes how much memory each variable is using up (I asked about this feature a few weeks ago but got no reply, so I think you cannot access the memory usage easily).

If your worksheet contains a lot of calculations, like Matrices, Arrays, plots, etc. one way to free up some memory is to "unassign" those that you don't need, e.g. those variables created during intermediate steps. For instance, after I create a plot and export it, say the plot is named myPlot, then I execute myPlot:='myPlot'; and this frees up (some if not all?) the memory that had been allocated to it, you can free up a lot of memory this way. You can also use the palettes, under standard gui, to unassign variables, this way you can see how many variables are currently in use in your worksheet; unfortunately I don't think that there is currently a way to see from the palettes how much memory each variable is using up (I asked about this feature a few weeks ago but got no reply, so I think you cannot access the memory usage easily).

Trying (and failing) to run Maple Standard from batch/shell commands. Maple 15 on Windows 7Prox64.

... I do hope I will have the moral courage to STOP experimenting further with this...

I could get cmaple.exe to work only via a batch file, not from the shell.

I couldn't get maplew.exe to work in any way I tried, neither batch nor shell. The cygwin shell didn't work either.

Below I report results from my test.

Using cmaple.exe:

the batch file works:
@echo off
"C:\Program Files\Maple 15\bin.win\cmaple.exe" "test.mpl"

the shell prompt doesn't:
"C:\Program Files\Maple 15\bin.win\cmaple.exe" "test.mpl"
maple: error, could not open ""test.mpl"" for input

"C:\Program Files\Maple 15\bin.win\cmaple.exe" test.mpl
maple: error, could not open "test.mpl" for input

"C:\Program Files\Maple 15\bin.win\cmaple.exe" \"test.mpl\"
maple: error, could not open "test.mpl" for input

"C:\Program Files\Maple 15\bin.win\cmaple.exe" \"\"test.mpl\"\"
maple: error, could not open ""test.mpl"" for input

Using maplew.exe, none of the above work.

By "work" I mean that the plot in the test file is not created/exported.

"C:\Program Files\Maple 15\bin.win\maplew.exe" "test.mpl"
launches a Maple 15 session and opens an "untitled" worksheet, displays nothing, exports no plot.

"C:\Program Files\Maple 15\bin.win\maplew.exe" test.mpl
launches a Maple 15 session and opens an "untitled" worksheet, displays nothing, exports no plot.

"C:\Program Files\Maple 15\bin.win\maplew.exe" \"test.mpl\"
launches a Maple 15 session and opens an "untitled" worksheet, displays nothing, exports no plot.

"C:\Program Files\Maple 15\bin.win\maplew.exe" \"\"test.mpl\"\"
launches a Maple 15 session and opens an "untitled" worksheet, displays nothing, exports no plot.

In a batch file, same behaviour except for:
@echo off
"C:\Program Files\Maple 15\bin.win\maplew.exe" \"test.mpl\"
which prompts for the file extension, and displays the content of the file (as below) in the window after "Maple Input" is selected.


No luck from the cygwin terminal either.

"C:/Program Files/Maple 15/bin.win/maplew.exe" -c 'read \"\"test.mpl\"\"'
bash: cd: C:maple/test: No such file or directory
A Maple 15 session is started and a worksheet opens with this message:
Error, could not open `test.mpl` for reading

"C:/Program Files/Maple 15/bin.win/maplew.exe" -c `read \"\"test.mpl\"\"`
bash: read: `""test.mpl""`: not a valid identifier
A Maple 15 session is started and a worksheet opens with this message:
Error, could not open `test.mpl` for reading

"C:/Program Files/Maple 15/bin.win/maplew.exe" -c read \"\"test.mpl\"\"
no message from the bash
A Maple 15 session is started and a worksheet opens with this message:
Error, incorrect syntax in parse: `;` unexpected (near 5th character of parsed string)

"C:/Program Files/Maple 15/bin.win/maplew.exe" -c "read \"\"test.mpl\"\""
no message from the bash
A Maple 15 session is started and a worksheet opens with this message:
Error, unable to read `test.mpl`

I also tried with the .m extension instead of .mpl, to no avail.

Here is my test file. Actually, there are two.

The content between the %%%%%%% was saved as "text" with .mpl extension

Test File Number 1:
%%%%%%%%%%%%%
# $define marker2 := 1;

# $ifdef marker2
MakePlot := proc(p::evaln)
    local name, place, opts:
        name := cat(convert(p,string),".ps"):
        place := cat(currentdir(),kernelopts(dirsep)):
        opts := `color,portrait,noborder,transparent`:        
    plotsetup('ps', 'plotoutput'=cat(place,name), 'plotoptions'=opts):
    print( plots:-display( eval(p) ) ):
    plotsetup(default):
end proc:
# $endif

# $ifdef marker1
1+1;
# $endif

# $ifdef marker2
2+2;
# $endif

# $ifdef marker2
testPlot := plot(x^2,x=-1..1):
MakePlot(testPlot);
# $endif
%%%%%%%%%%%%%


Test File Number 2: I removed the # in front of the $, just in case.
(From a batch file, cmaple.exe has no problem with either of them)
%%%%%%%%%%%%%
 $define marker2 := 1;

 $ifdef marker2
MakePlot := proc(p::evaln)
    local name, place, opts:
        name := cat(convert(p,string),".ps"):
        place := cat(currentdir(),kernelopts(dirsep)):
        opts := `color,portrait,noborder,transparent`:        
    plotsetup('ps', 'plotoutput'=cat(place,name), 'plotoptions'=opts):
    print( plots:-display( eval(p) ) ):
    plotsetup(default):
end proc:
 $endif

 $ifdef marker1
1+1;
 $endif

 $ifdef marker2
2+2;
 $endif

 $ifdef marker2
testPlot := plot(x^2,x=-1..1):
MakePlot(testPlot);
 $endif
%%%%%%%%%%%%%

 

Trying (and failing) to run Maple Standard from batch/shell commands. Maple 15 on Windows 7Prox64.

... I do hope I will have the moral courage to STOP experimenting further with this...

I could get cmaple.exe to work only via a batch file, not from the shell.

I couldn't get maplew.exe to work in any way I tried, neither batch nor shell. The cygwin shell didn't work either.

Below I report results from my test.

Using cmaple.exe:

the batch file works:
@echo off
"C:\Program Files\Maple 15\bin.win\cmaple.exe" "test.mpl"

the shell prompt doesn't:
"C:\Program Files\Maple 15\bin.win\cmaple.exe" "test.mpl"
maple: error, could not open ""test.mpl"" for input

"C:\Program Files\Maple 15\bin.win\cmaple.exe" test.mpl
maple: error, could not open "test.mpl" for input

"C:\Program Files\Maple 15\bin.win\cmaple.exe" \"test.mpl\"
maple: error, could not open "test.mpl" for input

"C:\Program Files\Maple 15\bin.win\cmaple.exe" \"\"test.mpl\"\"
maple: error, could not open ""test.mpl"" for input

Using maplew.exe, none of the above work.

By "work" I mean that the plot in the test file is not created/exported.

"C:\Program Files\Maple 15\bin.win\maplew.exe" "test.mpl"
launches a Maple 15 session and opens an "untitled" worksheet, displays nothing, exports no plot.

"C:\Program Files\Maple 15\bin.win\maplew.exe" test.mpl
launches a Maple 15 session and opens an "untitled" worksheet, displays nothing, exports no plot.

"C:\Program Files\Maple 15\bin.win\maplew.exe" \"test.mpl\"
launches a Maple 15 session and opens an "untitled" worksheet, displays nothing, exports no plot.

"C:\Program Files\Maple 15\bin.win\maplew.exe" \"\"test.mpl\"\"
launches a Maple 15 session and opens an "untitled" worksheet, displays nothing, exports no plot.

In a batch file, same behaviour except for:
@echo off
"C:\Program Files\Maple 15\bin.win\maplew.exe" \"test.mpl\"
which prompts for the file extension, and displays the content of the file (as below) in the window after "Maple Input" is selected.


No luck from the cygwin terminal either.

"C:/Program Files/Maple 15/bin.win/maplew.exe" -c 'read \"\"test.mpl\"\"'
bash: cd: C:maple/test: No such file or directory
A Maple 15 session is started and a worksheet opens with this message:
Error, could not open `test.mpl` for reading

"C:/Program Files/Maple 15/bin.win/maplew.exe" -c `read \"\"test.mpl\"\"`
bash: read: `""test.mpl""`: not a valid identifier
A Maple 15 session is started and a worksheet opens with this message:
Error, could not open `test.mpl` for reading

"C:/Program Files/Maple 15/bin.win/maplew.exe" -c read \"\"test.mpl\"\"
no message from the bash
A Maple 15 session is started and a worksheet opens with this message:
Error, incorrect syntax in parse: `;` unexpected (near 5th character of parsed string)

"C:/Program Files/Maple 15/bin.win/maplew.exe" -c "read \"\"test.mpl\"\""
no message from the bash
A Maple 15 session is started and a worksheet opens with this message:
Error, unable to read `test.mpl`

I also tried with the .m extension instead of .mpl, to no avail.

Here is my test file. Actually, there are two.

The content between the %%%%%%% was saved as "text" with .mpl extension

Test File Number 1:
%%%%%%%%%%%%%
# $define marker2 := 1;

# $ifdef marker2
MakePlot := proc(p::evaln)
    local name, place, opts:
        name := cat(convert(p,string),".ps"):
        place := cat(currentdir(),kernelopts(dirsep)):
        opts := `color,portrait,noborder,transparent`:        
    plotsetup('ps', 'plotoutput'=cat(place,name), 'plotoptions'=opts):
    print( plots:-display( eval(p) ) ):
    plotsetup(default):
end proc:
# $endif

# $ifdef marker1
1+1;
# $endif

# $ifdef marker2
2+2;
# $endif

# $ifdef marker2
testPlot := plot(x^2,x=-1..1):
MakePlot(testPlot);
# $endif
%%%%%%%%%%%%%


Test File Number 2: I removed the # in front of the $, just in case.
(From a batch file, cmaple.exe has no problem with either of them)
%%%%%%%%%%%%%
 $define marker2 := 1;

 $ifdef marker2
MakePlot := proc(p::evaln)
    local name, place, opts:
        name := cat(convert(p,string),".ps"):
        place := cat(currentdir(),kernelopts(dirsep)):
        opts := `color,portrait,noborder,transparent`:        
    plotsetup('ps', 'plotoutput'=cat(place,name), 'plotoptions'=opts):
    print( plots:-display( eval(p) ) ):
    plotsetup(default):
end proc:
 $endif

 $ifdef marker1
1+1;
 $endif

 $ifdef marker2
2+2;
 $endif

 $ifdef marker2
testPlot := plot(x^2,x=-1..1):
MakePlot(testPlot);
 $endif
%%%%%%%%%%%%%

 

thanks Alejandro, I'm onto Krusader. I seem to have missed it, yet apparently it's designed for KDE. I have used the Konqueror, but it didn't win me over for some reason.

On open source: thanks for the link. I'm not convinced by the anti argument, as spelled out by Jacques (who knows a lot more about the subject than me, I hastily add), in my naive view I think that under open source you could have a "Canadian" branch of Maple, where Maplesoft would keep a control over how patch fixes are submitted, integrated, etc. and it wouldn't have to incorporate any of them if it didn't want to, while at the same time letting enthusiasts around the world release their own version, with bug fixes and new bugs, etc. e.g. the "Argentinian" branch would be based on the classic Maple, etc..

;-)

thanks Alejandro, I'm onto Krusader. I seem to have missed it, yet apparently it's designed for KDE. I have used the Konqueror, but it didn't win me over for some reason.

On open source: thanks for the link. I'm not convinced by the anti argument, as spelled out by Jacques (who knows a lot more about the subject than me, I hastily add), in my naive view I think that under open source you could have a "Canadian" branch of Maple, where Maplesoft would keep a control over how patch fixes are submitted, integrated, etc. and it wouldn't have to incorporate any of them if it didn't want to, while at the same time letting enthusiasts around the world release their own version, with bug fixes and new bugs, etc. e.g. the "Argentinian" branch would be based on the classic Maple, etc..

;-)

isn't this an instance where a message like "Maple has detected the presence of logarithms in the expression. Such expressions may be simplified under additional assumptions,  refer to ?simplify,  ?path=ln"

I have read statements made by Maplesoft that features like 2D math and Document mode were added to make Maple more "user-friendly." I think that far more useful would be messages like the above. They could of course be removed by the advanced user interface(help=0) or whatever.

In addition to stuff about complex versus real simplifications, very useful would be warning/help messages about:

"Maple has detected the presence of an expression of the form e^(x). The notation for the exponential number is exp(x), refer to ?path=exp"

"there are other solutions, to obtain them refer to ?allvalues"

you get the idea.

isn't this an instance where a message like "Maple has detected the presence of logarithms in the expression. Such expressions may be simplified under additional assumptions,  refer to ?simplify,  ?path=ln"

I have read statements made by Maplesoft that features like 2D math and Document mode were added to make Maple more "user-friendly." I think that far more useful would be messages like the above. They could of course be removed by the advanced user interface(help=0) or whatever.

In addition to stuff about complex versus real simplifications, very useful would be warning/help messages about:

"Maple has detected the presence of an expression of the form e^(x). The notation for the exponential number is exp(x), refer to ?path=exp"

"there are other solutions, to obtain them refer to ?allvalues"

you get the idea.

I'm not familiar with CurveFitting at all, so I read the comments here with great interest, thanks.

One comment:

If I write the data with the following notation : upper-case for original data, lower-case for the log of that data (a typical notation in econometrics), one might write this (ignoring efficiency concerns, if any),

y := ln~(<892.,1012.,1060.,987.,680.,739.,809.,1275.,946.,874.,720.,1096.>):
x := ln~(<1.23,1.15,1.10,1.20,1.35,1.25,1.28,.99,1.22,1.25,1.30,1.05>):
yfit := CurveFitting:-LeastSquares( <x|y> , xfit );

yfit is the conditional expectation of y given x, something often denoted y|x. Note how easily confused one would get with the Maple syntax <x|y>. Well maybe not, but I did. The help page is explicit, thankfully, "the first set of data contains the independent values ... and the second set of data contains the dependent values..."


I don't know if this is helpful, but a legend can be added to the plot, for instance as follows:

Y := <892.,1012.,1060.,987.,680.,739.,809.,1275.,946.,874.,720.,1096.>:
X := <1.23,1.15,1.10,1.20,1.35,1.25,1.28,.99,1.22,1.25,1.30,1.05>:
yfit := CurveFitting:-LeastSquares( ln~(<X|Y>) , xfit );
        yfit := 7.15275353612720 - 1.92731508260192 xfit
plotData := plot( ln~(<X|Y>), 'style' = point, 'color' = red ):
plotFit := plot( yfit, xfit = ln(min(X)) .. ln(max(X))
  , 'color' = blue
  , 'legend' = ['y' = evalf[3](subs(xfit=x,yfit))]
  , 'legendstyle' = ['location' = top]
) :

plots:-display( [plotData, plotFit]
  , 'labels' = [ 'x=ln(X)', 'y=ln(Y)' ] );

I'm not familiar with CurveFitting at all, so I read the comments here with great interest, thanks.

One comment:

If I write the data with the following notation : upper-case for original data, lower-case for the log of that data (a typical notation in econometrics), one might write this (ignoring efficiency concerns, if any),

y := ln~(<892.,1012.,1060.,987.,680.,739.,809.,1275.,946.,874.,720.,1096.>):
x := ln~(<1.23,1.15,1.10,1.20,1.35,1.25,1.28,.99,1.22,1.25,1.30,1.05>):
yfit := CurveFitting:-LeastSquares( <x|y> , xfit );

yfit is the conditional expectation of y given x, something often denoted y|x. Note how easily confused one would get with the Maple syntax <x|y>. Well maybe not, but I did. The help page is explicit, thankfully, "the first set of data contains the independent values ... and the second set of data contains the dependent values..."


I don't know if this is helpful, but a legend can be added to the plot, for instance as follows:

Y := <892.,1012.,1060.,987.,680.,739.,809.,1275.,946.,874.,720.,1096.>:
X := <1.23,1.15,1.10,1.20,1.35,1.25,1.28,.99,1.22,1.25,1.30,1.05>:
yfit := CurveFitting:-LeastSquares( ln~(<X|Y>) , xfit );
        yfit := 7.15275353612720 - 1.92731508260192 xfit
plotData := plot( ln~(<X|Y>), 'style' = point, 'color' = red ):
plotFit := plot( yfit, xfit = ln(min(X)) .. ln(max(X))
  , 'color' = blue
  , 'legend' = ['y' = evalf[3](subs(xfit=x,yfit))]
  , 'legendstyle' = ['location' = top]
) :

plots:-display( [plotData, plotFit]
  , 'labels' = [ 'x=ln(X)', 'y=ln(Y)' ] );

and the best would be to copy-paste the code into the window in the 1D format, rather than 2D format, as there are occasional display problems otherwise.

First 30 31 32 33 34 35 36 Last Page 32 of 93