Preben Alsholm

13663 Reputation

22 Badges

19 years, 315 days

MaplePrimes Activity


These are questions asked by Preben Alsholm

I'm not being notified anymore about responses to answers or comments to MaplePrimes. I'm assuming that I'm not the only one (?). This has happened before.

A large procedure I made caused me some problems. I finally found the source of the problem.
There seems to be some interaction between the end of parameters marker, $, and the elementwise operation ~.

Consider these 3 versions of essentially the same procedure:

restart;
Q1:=proc(Var::list,$) local n;
  n:=nops(Var);
  print(Var,n);
  proc(var::list)
       subs(Var=~[seq(1..n)],var); #Elementwise
  end proc;
end proc:
Q1([x,y]); #Doesn't work : "invalid expression"
Q2:=proc(Var::list,$) local n;
  n:=nops(Var);
  print(Var,n);
  proc(var::list)
      subs(zip(`=`,Var,[seq(1..n)]),var); # zip
  end proc;
end proc:
Q2([x,y]); #No problem
Q3:=proc(Var::list) local n; #No end of parameters marker $
  n:=nops(Var);
  print(Var,n);
  proc(var::list)
       subs(Var=~[seq(1..n)],var); # Elementwise
  end proc;
end proc:
Q3([x,y]); # No problem
lprint(Q3([x,y])); #Curious output involving ` $`
#A fourth procedure in which the output is not a procedure works:
Q4:=proc(Var::list,$) local n;
  n:=nops(Var);
  print(Var,n);
  subs(Var=~[seq(1..n)],Var)
end proc:
Q4([x,y]);

Does anybody have any comments? Is it a bug?

Any plans of correcting the obvious problem the MaplePrimes text editor has with the inequality sign < ?
It is really quite annoying.
Everything on a line of code after < is very often discarded with the obvious effect that the code doesn't run.

For a while I haven't received notifications about updates to answers and comments from MaplePrimes. Is that due to the recent problem with fake messages from Maple?

I know that I have raised this question before, and also got some responses.

However, I cannot find the thread, and I'm still interested in what is going on.

I don't have a clue.

restart;
f:=proc(a)
plot(sin(x),x=0..Pi);
#plot(x^3,x=0..1);
#plot(undefined,x=0..1);
a^2   
end proc:

#Now try plotting what should be the parabola y = x^2 on the interval -1..1:
plot(f,-1..1,adaptive=false);
plot(f,-1..1);
plot(f(a),a=-1..1);

1 2 3 4 5 Page 4 of 5