Stretto

235 Reputation

5 Badges

6 years, 57 days

MaplePrimes Activity


These are questions asked by Stretto

 

I get tired of having to resize my plots constantly so I can get a nicer view.

 

setPlotSize:=proc(P,sz::[posint,posint])
  op(0,P)(remove(type,[op(P)],'specfunc(ROOT)')[],
          ROOT(BOUNDS_X(0),BOUNDS_Y(0),
               BOUNDS_WIDTH(sz[1]),BOUNDS_HEIGHT(sz[2])));
end proc:

 

This let's one set the size(mine is usually 1200x500) but I have to stick it in every plot.

 

Is there a way to override the plot functions to automatically do this for every plot or create a simple short option to scale it to the window size or some specific size?

 

I could probably make a simple function like RPF()

 

that I can wrap every plot but I'd like to avoid that step and just apply it to all plots by default(since 99% of the time I have to scale them.

 

 

 

I create a lot of procs and functions and then find myself having to create sequences of their values. I use for loops, seq or create a new proc to do it.

 

e.g., suppose I have a proc like f := n->n^2 or whatever. I can do [seq(f(k),k=0..5)]. Is there a very simple notation that maple has to do the same? E.g., hypopthetically f($$0..5) and it handles the accumulation in to a sequence itself

e.g., I have an equation that is written like a/b*c and maple rewrites it as a*c/b.

c is a complicated expression and when it's written with b under it, it takes up far more vertical spaces than necessary giving less visual resolution even if b is just 2.

In latex notation it is the difference between \frac{a}{b} c and \frac{ac}{b}.

 

In general what is the process? I noticed I can sometimes use ` ` to block things in but this also interfers with mathamtical notation. e.g., `3^f` becomes just that rather than f writen as a superscript.

Clearly I could hack it using various things but I want something direct and simple that tells maple not to try to do it's magic tricks.

For example, sometimes I might have 2*(a + b) and maple displays it as 2a + 2b. If I write it as `2`*(a+b) then this is noted as 2*(a+b) but the 2 is different.. I guess it is treated as a string or something... For my cases it works since I'm not trying to calculate anything from the expression but just for visual purposes, other times though I might want to calculate(usually the visual doesn't matter in calculation but sometimes both are desired).

I really want to avoid having to litter the expressions with special syntax to get such simple behavior. Something to tell maple not to carry out whatever algebraic transform it is programmed to do.

 

BTW, what does ! do? !3 + 4 opens a new window with an exit code.

 

 

 

I'm trying to create an iterator function

Iter := proc(ff, n)    
    local i,f;
    if n = 0 then return (x->x); end;
    f := x->ff:
    f := apply(unapply(ff))(x);
    for i from 1 to n-1 do
        f := ff(f);
    end;    
    return unapply(f,x);
end:

 

This seems to work except that it converts the independent variable to x, which can cause problems.

 

That is, if I pass something like n->sin(n) then it will output something like x->sin(sin(x))...

 

Of course, I do explicitly use x but it is because I don't know how to get the input's independent variable.

 

Ideally I'd like to be able to work on multiple arguments and iterate over the first, by default.

 

e.g., f#2(x,y,z) = f(f(x,y,z),y,z)

 

Ultimately the proc above doesn't work well as I want to be able to use it in all contexts(I could pass the value to Iter but I'd rather use function notation.

 

plot(x mod 3, x=-5..5);

 

plots exactly the same as

 

plot(x, x=-5..5);

 

and

 

plot(floor(x) mod 3, x=-5..5);

 

The mod function is doing nothing, why?

 

If I do 5 mod 4 I get 1, as expected.

First 7 8 9 10 11 12 13 Page 9 of 16