mmcdara

7891 Reputation

22 Badges

9 years, 56 days

MaplePrimes Activity


These are replies submitted by mmcdara

@Carl Love 

It's good that you have provided all this additional information.
Thanks for @segfault

@segfault 

Thanks?.
I edited my previous reply by adding a reference to Heck's book "An introduction do Maple" (in red in the text), where the diffference between names and variables seems to me very clear.

Good adventures with Maple

@Amir Saman Mir 

BTW, I forgot to tell you I'm using here (at home) a pretty old version of Maple (2015.2) and also of Physics.
So it's likely that a lot of improvements have been done since then  and a lot of features have been added to this package.

@Amir Saman Mir 

Did you think of something like this?

FindCoeff := proc(eq, var, {d::integer:=1})
  local Eq := `if`(type(eq, `=`), (lhs-rhs)(eq), eq):   if d <> 0 then
    coeff(eval(Eq, var=J), J, d)
  else     
    add(remove(has, eval(Eq, var=J), J))   
  end if:
  collect(%, [indets(%, name)[]])
end proc:


c := FindCoeff(Newton_generalized_MatForm, diff(`&varkappa;_`(t), t), 1);

c := FindCoeff(Newton_generalized_MatForm, diff(`&varkappa;_`(t), t, t), 1); c := FindCoeff(Newton_generalized_MatForm, H(t), 1);​​​​​​​



You can collect this result w.r.t. any symbol NOT declared in Setup  (here m alone).
But I don't know how to collect it w.r.t rho without pulling it out of the Setup declation:

FindCoeff(Newton_generalized_MatForm, `&varkappa;_`, t);
collect(%, [indets(%)[]])
 

and after having removed rho from the Setup declaration:

Setup(op = {H, I__C, I__G, Omega, R, a_, p, r, v_, `&alpha;_`, `&omega;_`, `&varkappa;_`}):
.
.
.
FindCoeff(Newton_generalized_MatForm, `&varkappa;_`, d);
   

@jud 

Sorry, I understood it was a rendering and vertex labeling issue.

@Rouben Rostamian  

Oh sorry, I didn't notice

@dharr 

Great, I vote up!



Both @dharr and I already told you that your code was full of syntax errors and it seems the only thing you are capable of is repeating the same question with the syntax errors.
Are you kidding us?


Either you define delta as a list, vector ar array  (delta[n]), or as a function  (delta(n)), not both!
I believe there is no recurrence behind what you mistakenly try to do, which is basically updating the values of Theta for consecutive x values.
So, first thing YOU HAVE TO CORRECT YOURSELF is to replace square brackets by parentheses wherever it's needed.

@dharr 

I agree, I nevertheless posted an answer for what it's worth

avoid to replicate questions, yours will be read and answered as soon as possible, don't forget that Mapleprimes is a worldwide community with some members still sleeping at the moment  :-)
More seriously, it's almost impossible to answer a question if you do not provide all the material: use the green up-arrow in the menu bar to upload your full worksheet.

See you soon.

PS1: Click on your first question, in the bottom right corner click on more, lastly delete it.

Look here to find a clue
https://www.maplesoft.com/support/help/errors/view.aspx?path=Warning,%20data%20could%20not%20be%20converted%20to%20float%20Matrix

@acer 

I hadn't undertood the subtlety.
Thanks for your reply

@Carl Love 

Thanks Carl.
@acer's code seems to display exactly the same things whatever  print/ is explicitely mentioned or not... which was the underlying reason for my question:
prettyprint.mw

@acer 

What is the purpose of print/ in the name of the procedures ?

@dharr 

You're right: when you know the values of the experimental inputs where the data have been recorded, the best option to use is output=Array.

 

@vv  @lcz 

Thank you vv, I'll take a look at it right away


If I'm not mistaken, plot is always in the foreground, and then if p, q are plot objects, then
display(p, q) displays ("<" means behind) p < q and display(q, p) displays q < p.
The same rule also holds if p is a  plot object and q an implicitplot object, or if both are implicitplot objects.

restart:
with(plots):
p := plot(x, x=-3/2..3/2, thickness=10, color=red):
q := implicitplot(x^2+y^2=1, x=-1..1, y=-1..1, thickness=10, color=blue):
display(p, q, axes=none);display(q, p, axes=none);

Here  p and q are always CURVES structure and that plot means PLOT(CURVES(...)).

The case 

restart:
with(plots):
p := plot(x, x=-3/2..3/2, thickness=10, color=red):
s := plottools:-disk([0, 0], 1):
display(p, s, axes=none);display(s, p, axes=none);

always displays s < p.
I guess the reason is that s is an object of type PLOT(POLYGONS(...)) and that a 2D object is always put behind a 1D object.
For instance

p := CURVES(...):
q := POLYGONS(...):
PLOT(p, q);  # displays q < p
PLOT(q, p);  # displays q < p


To control the display order the only method which always work is to display objects of the same structure.
For the OP's case a solution using plottools:-disk, that is PLOT(POLYGONS(...)) objects is to transform the object "c" (the blue arc) into a PLOT(POLYGONS(...)) object.
For instance

f  := t->x0*(1-t)^3+3*x1*t*(1-t)^2+3*x2*t^2*(1-t)+x3*t^3:
g  := t->y0*(1-t)^3+3*y1*t*(1-t)^2+3*y2*t^2*(1-t)+y3*t^3:
cd := [seq([f(t),g(t)], t in [seq](0..1,0.01))]:
no := [seq(eval([diff(g(t), t), -diff(f(t), t)], t=i), i in [seq](0..1,0.01))]:
no := [seq(no[i]/~norm(`<,>`(no[i]), 2), i=1..numelems(cd))]:
ci := [seq([cd[i][1]+no[i][1]*0.01, cd[i][2]+no[i][2]*0.01], i=1..numelems(cd))]:
C  := PLOT(POLYGONS([cd[], ListTools:-Reverse(ci)[]], COLOR(RGB, 0, 0, 1))):

DocumentTools:-Tabulate([ 
display(p0, p1, C, scaling=constrained, axes=none),
display(p0, C, p1, scaling=constrained, axes=none),
display(C, p0, p1, scaling=constrained, axes=none) 
])




An advantage of this method is that it keeps working whatever the shape you use to represent the nodes of the arc.

First 60 61 62 63 64 65 66 Last Page 62 of 154