mugwort

40 Reputation

4 Badges

6 years, 179 days

MaplePrimes Activity


These are questions asked by mugwort

Yo I have fit a surface to a curve using polynomial regression:

(It's only supposed to be fit for negative t domain)

Now I've attempted to cap this function off at 0, using a piecewise function of the original:


Which when I print, looks somewhat about right:

Sorry it's so hard to see but you get the idea. The problem is that this seems to set the whole function to 0, rather than just the bits that should clip:


The piecwise function seems to be evaluating the fN>0 condition to true for all input values p,t, rather than substituing the new input values into the original function fN, and then evaluating the condition for every point, not really sure what the problem is, would appreciate some help!

Forgive me for asking but I can't seem to find it in the docs, how do I create a plot which has a categoric variable rather than just real ones? i.e. having it print string labels along one axis rather than integers..

Also hoping this is possible on a 3D graph where each category is associated with 2 real values, i.e. a slice of the 3D plot...

 

Thanks

Say I have 2 matrices, in which the elements themselves are vectors.

I'm looking for a way to perform matrix multiplication on these so that rather than having the first element as x11y11+x12y21+x13y31

It would be x11.y11+x12.y21+x13.y31 where . is the dot product on the elements of each matrix.

I know I could write a procedure to do this manually but I was wondering if there's any pre-made operations (or modifiers on the Multiply operation) to do this.

I have a function defined which maps x to a polynomial.

The coefficients are highly precise floating point numbers, which is necessary since it needs to be accurate, however when I try to print the function it looks like a massive mess.

I tried to use print(evalf[4](f)); in an attempt to simplify it however this evaluation seems to have no effect on how it is displayed.

As I said, I can't use evalf when defining the function since it needs high precision.

Is there a way to do this without creating a clone of the function with the coefficients evaluated, just to print it on screen?
 

I'm trying to create a list containg the indices of another list, ordered corresponding to the descending size of the first list.

Say I have the list L := [8 7 9 12];

I want to find the list i = [4 3 1 2]

I know this could be done one element at the time by doing some iterative loop:
i := [];
for j from 1 to size(L) do
    member(max(L),L,'index');
    i := [op(i),index];
    subsop(index=NULL,L);
end do;

But I was wondering if anyone knew any fancy tricks to do this more concisely(and without destroying the original list)?

1 2 3 Page 2 of 3