Stretto

255 Reputation

5 Badges

5 years, 261 days

MaplePrimes Activity


These are replies submitted by Stretto

@vv 

 

I thought about that but the `;` terminates a statement. How does maple know that the sum is part of the definition of g? When I see that I see two statements:

 

g := x->local j;

 

sum(...,j=1..5);

 

 

@Carl Love 

 

Is there any way to evaluate some functions. In my expanion there are some factors that are 0 as they involve sin terms evaluated at integers but the expression is that on a function sin(f(x)) + f(x). I want to evaluate the sin terms(setting them to 0 in this case) but not the non sin terms(which are unknown).

 

@acer 

Can you ever come up with a reason why an nx1 matrix multiplied pointwise by a n vector could ever cause problem? Seems to me that they are completely equivalent structures and where ever one is used another can be used. That is,, is it not true that an n-dimensional vector space is isomorphic to nx1 and 1xn matricies?  If that is the case then there is no reason why it can't be simplified when dealing with pointwise multiplication.

A*~a = a*~A = B*~a = a*~B

for a a n-vec and A a 1xn and B a nx1.

We are not talking about matrix multiplication where the dimensions must be compatible, we are talking about element wise multiplication.

The fact that your rule to solv ethe problem is simply an obfusication of syntax proves this. Maple could internally rewrite every syntax for us and the arbitrary distinction is not then required.

Unless you can prove that it can't behave this way(but you already have given a syntax that proves it can, at least in this specific case).

[So, maple could, internally require every pointwise operation of a 1xn or nx1 matrix with a n-vector without issue and ide that excess syntax from us without any potential problems, so why force us to jump through such hoops that are meaningless?]

@Carl Love Thanks, works well. Is there a simple way to control amount of interpolation from constant to whatever?

 

@tomleslie 

 

Thanks, that works! Is there a simple way to interpolate to get a smooth curve?

 

listplot(S, smooth);

 

@acer 

 

kernelopts(homedir) gives `C:\User\Me`

 

which is not what I've set in the maple ini files(there are two and both have the dir I want).

I have 3 maple ini files. One seems to be the total settings and others are minor. They all have the proper dir and set according to the files but none change the home dir.

 

in maplelauncher.l4j.ini

# Define a folder where to store Maple preferences
-Dmaple.user.home="B:\Maple Files"

If I drop the parenthesis maple refuses to load,

 

So this definitely seems to be the correct file that but it refuses to set the dir and execute the maple.ini file in that directory. I've tried using various formats but maple never reads the file. It seems the space causes it to crash without quotes. If I change it to anything maple still does not get the correct dir and just uses C:\User\Me.

I created the maple.ini file in C:\User\Me and it does load it, I then added a read to the file I want and it does read it, so that is a "solution".

 

I added

 

interface(echo = 0):
interface(warnlevel = 0):

 

but that does not hide all the junk that the code prints at the top of the worksheet which I'd like to avoid.

 

 

interface(echo = 0):
interface(warnlevel = 0):
 
 
  read `B:\\Maple Files\\maple.ini`;
 
 
interface(echo = 2):
interface(warnlevel = 4):

 

and the read file does some stuff and some of that stuff get's printed:

>                              I
> interface(warnlevel = 4):
>   
>   
> interface(echo = 2):
> interface(warnlevel = 4):

 

 

 

 

Thanks. Yes it seems to.

 

Is there any way to overload the _?

 

I'd like to have a notation [x]_n.. which is simply a rewrite of q(x,n) for some special functions.

 

 

@acer 

if not i::numeric then return 'procname'(args); end if;

 

That works except that it get the wrong values ;/

 

The only difference is I have

 

f := proc(a,b)
    if not a::numeric or not b::numeric then return 'procname'(a,b); end if;

 

When using add it works fine and I get the wrong values but using sum I get the wrong ones. Without the above sum fails.

 

 

 

@Carl Love 

Thanks, but i do not get what you mean by DataFrames. I've never used them, they seem just like tables with info attached. How can one define a simple boolean type of [a=b] which returns 1 if a = b and 0 else?

 

@Carl Love Thanks for the informative response.

@Carl Love Thanks. I usually add with(plots) and I thought I did but I guess I didn't.

@tomleslie 

 

I've tried that but it doesn't seem to work. I was able to change the folders but I don't see where to get a worksheet or library loaded.

 

https://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/reference/initialization

 

Under Windows, the initialization file is called maple.ini.

 

I changed

 

2. 

Open the file, maplejava.i4j.ini.

3. 

Uncomment the second line # -Dmaple.user.home="C:Temp" and change C:\Temp to the directory you want to store the .ini file in.

 

 

(was maplelauncher.i4j.ini as I did not have maplejava.i4j.ini)

 

The initialization file is an ASCII text file that contains the commands in Maple syntax. It is recommended that you use a colon to end the commands so that the output is not printed in the worksheet on startup. In multiple user environments, one initialization file can be defined for all users, and all users can also have their own initialization file. The specific name and location of this file varies depending on the operating system.

 

A new maple.ini was ultimately created with all the settings(reset to defaults). But I see no where to add or change files to add commands to the initialization file.

 

It seems this info is outdated. maple.ini are just the settings from options.

@Kitonum 

 

That is what I was looking for, Thanks!

@tomleslie  I should never have mentioned erf or any other specific function, it has nothing to do with the real problem and has only gotten the problem off on a tangent. I don't care about erf, I was just using it as a placeholder to specify a real function for simplicity.

 

The point is that

fourier: Entering fourier with erf(t)
inttrans/fourier/lookup: Enter with  erf(t) t v
inttrans/fourier/lookup: Returning  FAIL
inttrans/fourier/main: Entering with erf(t) t v
inttrans/fourier/lookup: Enter with  erf(t) t _S
inttrans/fourier/lookup: Returning  FAIL

inttrans/fourier/main: Leaving(3) with fourier(erf(t) t v)

 

 

 

Fails FOR some functions such... For some very complex functions it will always fail since there is no closed form solution. In those cases I want to evaulate numerically. I could do this by computing the fourier transform or even the fft but I would expect maple to have the machinery inside it to do this stuff for me... since all I want to do is plot.

 

In matlab I can do this basically with the fft command.. I can even define an arbitrary function and use it to compute the values.

 

Maple is symbolic, but plotting has nothing to do with symbols... since all I want to do is plot there should be some way to plot complex functions without having to go in to another program or wait years for it to complete.

 

 

@Mariusz Iwaniuk 

 

I should never have mentioned erf or any other specific function, it has nothing to do with the real problem and has only gotten the problem off on a tangent. I don't care about erf, I was just using it as a placeholder to specify a real function for simplicity.

 

4 5 6 7 Page 6 of 7