acer

32328 Reputation

29 Badges

19 years, 318 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@delvin There's no mystery as to how to end a Maple statement with a full colon -- it's a key on your keyboard.

Sometimes it's worthwhile checking the size of potentially large expressions, before printing them. There's often only so much insight to be had from looking at wallpaper of formulas. Simplifying large expressions before printing them can also be useful.

03_ac.mw

(You might want some other, alternate rearrangement of the terms, but if so you then haven't described it.)

Please put your followup example here, instead of spawning a wholly separate new Question thread for it.

@Thomas Dean with the local declared...

restart;

kernelopts(version);

`Maple 2022.2, X86 64 LINUX, Oct 23 2022, Build ID 1657361`

eqs := [u     + v     + w     = 1,   u*x   + v*y   + w*z   = 1/2,
        u*x^2 + v*y^2 + w*z^2 = 1/3, u*x^3 + v*y^3 + w*z^3 = 1/4,
        u*x^4 + v*y^4 + w*z^4 = 1/5, u*x^5 + v*y^5 + w*z^5 = 1/6]:

soln := [solve(eqs, explicit)]:

andmap(t -> local eq; is(`and`(seq(eval(eq,t),eq=eqs))), soln);

true

andmap(proc (t) local eq; is(`and`(seq(eval(eq, t), eq = eqs))) end proc, soln)

true

Download seqlocal.mw

@RezaZanjirani You are very welcome. I'm glad that you have it working as you want.

Note that what I did in your worksheet (in my Reply above) is the same approach that I'd shown in the first example&attachment in my Answer.

@Carl Love I recalled some of the OP's earlier postings using the same basic code layout. Some of his "parameters" are the global names to which he's assigned values, rather than some procedure's parameters having values passed into a call.

ps. It sure does help when people provide their actual code in an attachment to the Question.

@RezaZanjirani It seems to work, respecting the rhs&lhs of the inequality, as well as preserving the symbol c unevaluated, whether one uses,
   Typesetting:-Typeset(p__s < c)
or,
   Typesetting:-Typeset(c > p__s)

Scenario_ac.mw

Scenario_ac2.mw

So I'm not sure I understand what you mean when you state, "But it does not work on my own code".

ps. Your code has the input as c>p__s , by the way, though you indicate elsewhere that you want it as p__s<c.

@sand15 A fundamental danger of your trick is that some denominator involved in the computation for the generic x[i,j] could be mathematically zero when replaced by the B[i,j] expressions. Subsequent evaluation of the final result can then fall prey to the division-by-zero time-bomb.

@FDS To the right of an Answer's title is a thumbs-up icon and (if you posted the Question) a cup icon.

Anyone (with reputation score of at least 10) can vote-up an Answer by clicking the thumbs-up icon.

The person who posts the Question can also accept it as best by clicking the cup icon.

Naturally, you are free to do this for any of the Questions you post in this forum.

@Rouben Rostamian  The worksheet attached by simplevn1967 was saved by him using Maple 17 (released 2013).

@lemelinm The effect of your first suggestion -- to control the color of the surface "grid" lines differently from the color/shading of the surface -- is already mostly possible to achieve, and without having to recompute the surface's data points (eg. z-values).

The key here is to compute (once) the plot values, either as pure surface or pure wireframe style. Then the other can be constructed by overriding that option, ie. without recomputing the values.

For example, (and you could also adjust other qualities of these wire-frame lines, eg. thickness=2 , etc),

with(plots):
P := plot3d(-x^3+y^2,x=-1..1,y=-1..1,style=surface):
display(P,display(P,overrideoption,
                  color="Orange",style=wireframe));

Naturally, that example applied the override only to a single surface. One might well not want to have it as a blanket effect on all compound parts of a VolumeOfRevolution result. (But even there, it can be done selectively, with a bit of care.)

I'd agree that a simple choice of options for the effect you've described would be more user-friendly. On the other hand, there are several other things I'd rather take priority. Eg, separate x/z, y/z, x/y aspect ratios for the axes.

ps. I think that jtreiman's original suggestions (at top) produce a result that is easier to interpret than the default for the command in question.

@Christopher2222 Calls to time() ought to be calls to time[real]().

You could do that something like this:

caring_phase_pemanenan_predator_dgn_parametersesuai_jurnal_ac3.mw

I indexed table T by t-values, only because I don't know how you plan to access the maxima later. You could also index by the ordinal, `found`, etc.

It's not clear from your latest question whether you want the global maximum (over t=0..100, say) or all the local maxima each time around (when diff(x(t),t) is zero).

Here's a simple way to get that global max from the phaseportrait data itself, and the corresponding time, for one of the initial values.
caring_phase_pemanenan_predator_dgn_parametersesuai_jurnal_ac2.mw

There are several more complicated ways (eg, wrapping x(t) in a proc that does extra tracking), or using dsolve/numeric's events options, etc. That kind of approach can also come in useful if you want to save values "each time around", or each time diff(x(t),t)=0, etc. Let us know if you need.

Are x,y,z all to be considered as real?

Why do you use the symbolic option?

Could you provide some examples of input and desired answer?

@AHSAN If you want to move the horizontal line segment,

   plot([[-5, 0], [5, 0]], color=black)

either up or down then simply change the second values in the lists to something else. Do you not understand that the second values in the lists are the vertical (y) coordinates of the line's end-points?

Similarly, if you want to move the vertical line segment,

   plot([[0, ymin-eps], [0, ymax+eps]], color=black)

either left or right then simply change the first values in the lists. Do you not understand that the first values in the lists are the horizontal (x) coordinates of the line's end-points?

I think you could have easily figured this out for yourself.

First 61 62 63 64 65 66 67 Last Page 63 of 591