nm

11353 Reputation

20 Badges

13 years, 18 days

MaplePrimes Activity


These are questions asked by nm

Update: rebooting the PC fixed this error for me. Now help comes up OK.

original question:

I am on windows 7, home editon, running Maple 2018.

For some reason, now each time I tried to get help, I get the message that it lost connection with server. I closed Maple, started it up again, and same error happens. Movie below.

This also happend from new worksheet also Each time I type ?anything I get the above.

 

Any idea what can cause it? and where I should look for errors?

I did not nothing before this to anything on system. Was just editing some worksheet which opens fine. It is only help that seems to be having hard time.

 

 

I downloaded alglib from 

http://algo.inria.fr/libraries/obsolete-releases.html

Downloaded the .mla and the .hdb files. Put them in current directory where my worksheet .mw is.

Opened the .mw and typed

restart;
libname := currentdir(), libname;
_algolibcontent();

Content of algolib (version 14.0), as of October 2010:

+ encyclopedia.            [Written by Stéphanie Petit, with contributions by Bruno Salvy and Michèle Soria.]
+ gdev.                [Written by Bruno Salvy.]
+ gfun (version 3.53).        [Maintained and extended by Bruno Salvy, with contributions by Ludovic Meunier, Marc Mezzarobba, Marni Mishna, and Eithne Murray, original version by Bruno Salvy and Paul Zimmermann.]
+ Holonomy (version 3.4).    [Written by Frédéric Chyzak.]
+ MAD (version 1.445).        [Written by Ludovic Meunier.]
+ Mgfun (version 4.1).        [Written by Frédéric Chyzak, with contributions by Shaoshi Chen, Cyril Germa, Lucien Pech, and Ziming Li.]
+ MultiSeries.            [Written by Bruno Salvy.]
+ regexpcount (version 1.5).    [Written by Pierre Nicodème.]
 

Ok. Now how to obtain help? I can call one of its functions, like this

MADLaTeX:-latex(1/2);

    \frac{1}{2}

 

But I do not know how to find help on MADLaTeX:-latex since ?MADLaTeX does nothing and ?MADLaTeX:-latex does nothing. 

How to obtain the help pages for this package? I looked online and do not see anything. I do not know what to do with the .hdb file that I downloaded. I am using Maple 2018 and it does not seem to support .hdb files anyway. 

Does I need to go through all the conversion steps described in

https://www.maplesoft.com/support/help/Maple/view.aspx?path=HelpTools%2fMigrate

just to see help on one function? 

I just need to find how to call is Latex function and if it has any options. Any one knows an online page that have these on it?

After solving something, sometimes the result comes in piecwise. I'd like to just obtain all those results which are not undefined, into a list, so I can process them more easily. I am not sure what is the correct way to do this in Maple.

Here is an example.

restart;
f := piecewise(x>-1 and x<=0, x^3, 
               x>0 and x<=Pi/2, sin(x), 
               x>Pi/2, undefined, 
               x=20, 5, 
               x=50, undefined);

I need to pick all entries that do not have "undefined". I do not need the rhs condition  which is x<=1. So for the above, I'd like to obtain

                               sol:=[ x^3, sin(x), 5]

If there more entries which are also not undefined, they go into the list in order. 

when I do 

sol:=convert(sol,pwlist,x);

This gives     

sol := [0,-1,x^3,0,sin(x), (1/2)*Pi,undefined,20,undefined,20,undefined,50,undefined,50,undefined]

Now it gets confusing. How to change the above to 

       sol:=[ x^3, sin(x), 5]

I do not even understand the conversion result above. I do not know why it gives 50 twice. And I do not even see the "5" in there. So I do not know how to decode this now.

Update:

I found this solution. But it might not be best:

contents :=[op(f)];
[seq(`if`(contents[i]=undefined,NULL,contents[i]),i=2..nops(contents),2)];

gives

              [x^3, sin(x), 5]

I am learning patmatch. And found strange problem.

When I make an expression inside a proc A, and pass this expression to another proc B, which then uses patmatch  on it, the pattern fails to match.

but calling proc B directly, with exactly same expression, patmatch does match.

This is confusing and not sure why it happens. It seems related to using symbol which was declared local vs. same symbol but is global. Here is an example

restart;
foo:=proc()
  local x,C1;
  boo(exp(C1+x));
end proc;

boo:=proc(expr)
  local a,b,c,la;
  patmatch(expr,a::anything*exp(b::anything*C1+c::anything),'la');
end proc;

Call to foo() returns false. But call to boo() returns true. Even though I am using same expression.

foo();
   false


C1:='C1':
x:='x':
boo(exp(C1+x));
   true

  

What Am I doing wrong, and how to make it work in both cases?

Currently, I have some definitions of modules and or functions in one worksheet, say A.

To reduce clutter in A, I'd like to open second worksheet, say B, and invoke the functions defined in A in the B worksheet. This way I keep the definitions in one worksheet, and the tests/trying them, in another worksheet.  I do this all the time in Mathematica. It useful, as I like to keep one notebook for just definitions, and second one for testing and calling the functions.

I just found out, that a function defined in worksheet is not "seen" in worksheet B.  I looked at options and settings, googled a little, but not able to find an option to allow me to do this. I tried Tools->General->Share one engine among all documents. Clicked Apply. But that still did not do it.  From worksheet B, it tells me it does know the function I am trying to call. Only in worksheet A it can see the function.

Is there an option to allow one to have the function definition be seen on all open worksheets?

I know I could save the functions as mpl files, and then load them in the second worksheet. But during development, the first method is easier.

First 158 159 160 161 162 163 164 Last Page 160 of 199