acer

32343 Reputation

29 Badges

19 years, 327 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@BenOve I'm away from a computer, today. But I do have more explanatory details to add, and I'll do so soon. Thanks for your patience.

Why post this followup query as a new Question thread, instead of adding it to your earlier Question here? Now all the details from the two threads are unnecessarily split, and readers and answerers in one thread may miss content from the other. (If you want to avoid cluttering the earlier thread then you ought to have been able to use its Question's Branch link. That automatically adds cross-reference note and url.)

Also, recall that in your previous Question there was a problematic ambiguity in use of the term "extract". That denotes that the pieces are to be taken out (ie. extracted) as separate items (as indets does). But in your earlier thread you later accepted responses which utilized select/remove so that the result was still a sum, or the accepted terms. So which do you want here, the accepted items separately, or a sum of with only the accepted terms remaining? 

Please don't post duplicates of this in separate Question threads. If you have followup examples then you can simply add them here as a Reply to the original.

(I have just deleted a duplicate thread that had the same kind of error message due to the same kind of problem -- which is addressed below.)

@lekcha Please see the attachment.

One simple approach is (as I mentioned before) to ensure that fs and de had values prior to entering your while-do-loop, so that the conditional could actually be tested on the first iteration. (I did not implement an alternative of using until instead of while.)

I also cleaned up some things: making f1 be computed inside your procedure, allowing the working precision, maximum allowed iteration, and tolerance to be passed in as options (with some defaults), fixing what you had as "n" for part of the return, adding all the iterates to the return, etc.

Also, you were making no use of the second derivative f2, so I commented out the double-application. Perhaps you are intending to fix up the formula (for Newton's method, making use of both f1 and f2 appropriately).

lekcha_ac.mw

 

@Frankoldstudent Please see the following attachment, in which I make another attempt to explain the fact that action-code of Embedded Components will never directly change or replace previously displayed regular/usual output.

In the attachment I include two additional components which are dynamically changed by the slider's action-code: a math container, and another math-container with its borders hidden.

CreatingSlider_ac_ac_ac.mw

Note that new values may be programmatically assigned to a variable (such as the name `a`), which is a description of how the Maple computational engine stores things in memory. That is not the same as the various ways (some more dynamic, and some more of a snapshot in time) in which a value can be displayed/printed/used-programmatically at some given moment.

[edit] An analogy: Two days ago a bank balance was written down on a piece of paper. Yesterday a mortgage payment was made from the account. The value in the account really has changed, but the piece of paper doesn't show that. Fancy online banking apps might be able to show the running value, dynamically, as they update. But the value written down on the piece of paper is static (unless I erase/overwrite it manually). The banking apps are more like the embedded components. The piece of paper is more like usual output in a worksheet.

note. You keep attaching your Replies (to me) onto your original Question, instead of my Answer. I keep moving them, approppriately.

@Frankoldstudent The value assigned to `a` does also change when you move the slider. That's one of the two things that my example does.

If you re-execute the line that (previously) printed a prior value of `a` then it should reflect that last attained position of the slider -- when it subsequently prints the current value.

But the previously printed output of that same input line is static output, in the sense that it won't change unless you also re-execute that separate input line (or delete the output).

That's why I also included a textarea component, to illustrate how the running values of the slider may be used to dynamically update other embedded components.

The action-code of embedded components may also alter the appearance of other embedded components (Text Area Component, Math Expression Component, etc). But action-code of embedded components don't alter regular output that has been printed already to the worksheet.

That is also related to why I mentioned that the action-code of the slider may pass the running slider value to some other command (eg. a procedure that you have written yourself, or another stock command).

@Marvin Ray Burns Please do not repost reformulations of your results here, in a separate Post.

Could you lprint it, in Maple, and the copy that?

Hello Andreas, was this posting in another forum by you, or by someone else? Thanks.

It might be useful if you could mention your OS platform, whether this happens in a fresh session, whether it is using a 1D plaintext command or a context-menu action on 2D input or output, and whether you have any special Maple commands in personal initialization file.

@mmcdara I think the scenario you describe is esoteric and unlikely to represent this case.

If the Questioner merely wants the intersecting dashed lines using values 0.5, 1.0, 1.5 for `t` then a straightforward, usual, easy and accurate way to find the corresponding intersection points is to simply evaluate at those values (using whatever made tha smooth plot).

There is, as yet, no evidence that your esoteric scenario applies here. If a formula or function/operator for the curve is available (very common, no evidence yet to the contrary) then using a copied point-probe is relatively poor. It would fail to provide instruction in common and reusable Maple usage skills.

The dashed lines get produced and added programmatically, regardless.

Why can't you simply evaluate at the given numeric values for t?

Show us how you produced the plot, and we can show you how to do that.

That would be more accurate and far less error prone than using crude mouse-pointer position.

You can upload and attach a worksheet using the green up-arrow in the Mapleprimes editor.

What is your reason for not explicitly telling us what it is that you do need?

@vs140580 For 2D plots you can pass the option,

   legendstyle=[location=right]

etc, to the plotting command or to the plots:-display command for your case of a merged point-plot and a curve-plot.

For the 3D case there is no direct facility to place a caption (or title) on either side, and legends aren't available. I can, however, think of a few ways to mimic the effect. One way is to use a textplot, placed carefully according to a fixed orientation (without further manual rotations). Another is to use Tabulate to place a close 2D plot containing only the legend (although that cannot then be exported as a single image).

But I am not going to do either of those unless you state explicitly and believably what is your final goal. You have made ten (!) followup Replies in this thread, many of them revisions or augmentations of your goal. I don't believe that your latest Reply was your final goal.

@vs140580 The following behaves for me in Maple 2020.2. The color symbols also survive export of the plot to an image file.

The attachment shows how the caption can be stacked (multi-line), or a single space line (seen below).

regr_3d2d_4.mw

 

Note: The techniques from this old Post don't work completely properly in my Maple 2020.2, since when I right-click on the plots to export the symbols in the plot (not the caption!) vanish. The above attachment has a tweak to the approach which fixes that (for me, at least).

@vs140580 

Uncomment the legend for the fitted curve, if you want.

F2d:=Statistics:-LinearFit(a*x, pts[..,[1,2]], x):
plots:-display(
  plot(pts[..,[1,2]],
       style=point, color=red,
       legend="my data points",
       symbol=solidbox, symbolsize=15),
  plot(F2d,
       x=min(pts[..,1])..max(pts[..,1])
#      , legend="fitted curve"
       ),
  labels=[x,y], axes=box);

I believe that you could figure this out after reading the Help pages on the links I included.

First 129 130 131 132 133 134 135 Last Page 131 of 592