mmcdara

7891 Reputation

22 Badges

9 years, 60 days

MaplePrimes Activity


These are replies submitted by mmcdara

I had a look at the  Maple Flow website, it sounds to be something very exciting  but I didn't understood what Maple Flow really is.
Is it some kind of an alternative to MapleSim for "simpler" problems whose description doesn't need a graphical Modelica-like-description?
Or an extension to MapleSim?
What do we need to use Maple Flow : the last 2021 Maple's version only, or MapleSim, and possibly extra toolboxes like GlobalOptization for instance?
There are no informations about this on the Maple Flow website apart the the contact-us-if-you-want-a-demo ad which is a shame.
Could you please enlighten me a bit?

Thanks

@ 

Maybe you could find this useful?

ShowSolution.mw

Student:-Calculus1:-Showsolution is a powerful feature to trace how Maple fcomputes (here) the antiderivative iof some function.

@nm 
Example of double underscoring and double index

seq(seq(cat(`u__`, [i, j]), i in [a, b]), j in [2, 1]);

           u__[a, 2], u__[b, 2], u__[a, 1], u__[b, 1]

Note that replacing square brackets by brackets automatically sorts the double indices in a non desired way

seq(seq(cat(`u__`, {i, j}), i in [a, b]), j in [2, 1]);

           u__{2, a}, u__{2, b}, u__{1, a}, u__{1, b}

If you want to conserve the order "i first, j next" you can do this

seq(seq(cat(`u__{`, i, `,`, j, `}`), i in [a, b]), j in [2, 1]);

             u__{a,2}, u__{b,2}, u__{a,1}, u__{b,1}

 

@acer 

Thanks for these detailed info.

@tomleslie 

Thank you Tom, it works perfectly well on my real problem (even if I still have some parameters to tune...)
I appreciate your first advice too.

Thanks also for your extra material.
 

@Carl Love 

Thanks, I will fix this

@Carl Love 

Only a single iteration is performed (at the mid point of the domain defined by the ranges)
 

TV := proc(p1,p2)
  sol(parameters=[args]):
  sol(10):
  return sol(eventfired=[1])[];
end proc:

ranges := 0.8..1.2, 0.8..1.2:
Optimization:-Maximize(TV, ranges);
                    
# [ 4.15262, < [1, 1] >


From a simple Newton-Raphson method the solution is here
 

p = [1.2, .952793192421087], T =6.88369274340069

@Carl Love 

Big thanks Carl!
I grant you the points.

@Carl Love @tomleslie @acer @TechnicalSupport

I apologize for forgetting to thank you for your many contributions. 
I'd posted this question from the office before going back to teleworking and simply didn't remember of it.
 

@Carl Love 

Thank you Carl for all your answers ; your generalization is really a great improvement.
About your last remark "I don't know why you'd want that given that abs~(v) and cos~(v) already work as is; nonetheless, the code below handles this": sure, but a single "swiss knife" might not be a bad idea.

Could you explain me the meaning of these lines?

`~orig`:= eval(`~`):
unprotect(`~`):
`~`:= overload([
    proc(A::rtable) option overload; DimMap(op(procname), args) end proc,
    `~orig`
]):
protect(`~`, `~orig`):

 

Here is a special case of the situation you refer to.

When a big "code", or application, is developped in parallel by a team of people, one usually uses a "code versioning" tool (CVS or GIT for instance).
With such a tool several people can write at the same time ... not exactly the same worksheet (if the developments are made in Maple) but each of them a different image of the same worksheet. The code versioning app is aimed to manage (branching and merging, restoring, commiting, and so on) the works done by all these people.
Personnaly I use Git in conjunction with Notepad+ (which is a contextual editor which recognizes Maple's syntax) ; the constraint is that the worksheets have to be saved in a mpl file.

I don't know if this can help you.

@Carl Love 
It could be easy to transform Kitonum's output or mine into a matrix by doing this

`<|>`(op(%))

But it's not my point here.
Your procedure is indeed an interesting to apply a function f : U-->V where U and V are vectors of the same length.
Could you adjust in such a way it also supports simpler transformations, for instance to mimic abs~(v), or cos~(v) , in order to make it a more versatile tool?
 

@Spinosaurus
The package ImageTools could be a solution too.

The first step is to export the image as image.png by right clicking on it.
Once done, open the image with any visualizer and export it as image.tiff.
The attached file could help you  to go further

ImageTools.mw

# c contains the coordinates of the points (in pixels, so you need to rescale them) that are "almost"
# on the curve

c := map(u -> if M0[op(u)] <> 0 and u[1] > 60 and u[2] < 430 then u end if, [indices(M0)]):
T := plottools:-transform((x,y) -> [x, 430-y]):
plots:-display( T(plots:-pointplot(c, symbol=point, size=[800, 400])) );



Depending on what you wabt do do with these points, it could be rather simple to build  a sharpened curve, to compute the trend (by Statistics:-LinearFit), and to a few more complicated stuff (see package SignalProcessing for instance).

@vv 

Thank you vv for this later precision.
Meanwhile I had completed my previous reply.
Thank you again.

@Carl Love 

Huge thanks.
StringTools is a very rich package and i've browsed it in search for such a procedure. But it contains so many functions that I've missed this one.

I vote up

First 87 88 89 90 91 92 93 Last Page 89 of 154