acer

32480 Reputation

29 Badges

20 years, 6 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Carl Love You can find it online, eg. Wikipedia or here.

A partial phrase from that cited Wikipedia page, "...it is actually the three-channel RGB color model supplemented with a 4th alpha channel. Alpha indicates how opaque each pixel is...".

Maple's ImageTools package has support for RGBA, (where the "A" standa for alpha). But its plot drivers do not.

So, for example a COLOR plotting substructure can contain the keyword RGB alongside a mxnx3 float[8] Array, but cannot contain RGBA as a keyword alongside a mxnx4 float[8] Array.

Hence my Answer below, where each point is used to form a separate plotting structure containing its own TRANSPARENCY substructure (all of which can then be displayed together).

@tomleslie By coincidence, I was already editing that sentence, while you were posting your comment. Thanks.

The central point is that the right command here is Search, not Has.

Could you provide a fully explicit example of the kind of data that you wanted plotted, and specify the kind of plot?

How exactly do you want something like an alpha channel to modify the shading? Do you want each plotted point to be affected separately? As a function of x values, or y values, or other?

Would you be satisfied with a gradation of intensity (and/or saturation), rather than directly as an alpha channel? (I realize that this is not the same thing. But it's unclear what precise visual effect you're string for. It's unclear whether you want to overlay the point symbols on top of another plotting artefact.)

It looks like you are trying to get the GUI to display a PLOT structure that contains an unsupported RGBA specification within a COLOR substructure.

How was it created?

@vv Perhaps, at least at some point in time. Some of the LinearAlgebra help pages on performance and efficiency have been revised, however.

But the behavior has been like this for something like the past 19 years. Examination of the code in the LinearAlgebra commands shows a degree of consistency of behavior in this regard, which (IMO) demonstrates a deliberate design decision.

There is an even stronger consequence of the behavior, which is that the ensuing float[8] datatype acts in practice as a gate-keeper against subsequent assignment of values not of numeric type. I find it significant that I cannot recall any complaint about that stronger (but surmountable) consequence. The behaviour might be sumarized as something roughly like this: if the data is all of type numeric and a float is present then the result for rtable arithmetic has datatype float[8] or sfloat.

@tomleslie Somebody from Maplesoft's QA (Quality Assurance) department is making test posts.

Some have already been deleted.

Perhaps they are testing 2dmath as rendered by the Maplenet backend if this site. Perhaps they are testing the Matlab link. Surely the details are not relevant to most of us.

The help page for topic VectorCalculus,Curvature does not state that it computes the signed curvature in the special cases of a plane curve. What that command computes is a magnitude.

The help page for topic Definition,curvature gives two definitions. Only the first is a definition for signed curvature for a plane curve.

@Jonas F As far as I know there is no special setting of the Maple 2019.1 GUI which reverts its behavior in this regard. Explicit action (ie. Shift-F5) may be required.

Asking about it again is unlikely to alter that.

This kind of thing has been reported before, I believe.

Another workaround is to convert the Heaviside to piecewise, before integrating.

I'll note that the issue can also arise for an exact value for the variance, in your example. It therefore seems reasonable (to me) that a workaround other than recourse to up-front numeric quadrature may sometimes be useful or desirable.

restart

with(Statistics)

X := RandomVariable(Normal(1, sqrt(2.25)))

int(PDF(X, x)*convert(Heaviside(x^7-5*x^4-3*x+1), piecewise), x = -infinity .. infinity)

.5275852105

 

Having a brief look at how it may go wrong, we might compare these:

 

X := RandomVariable(Normal(1, sqrt(225*(1/100))))

`assuming`([int(PDF(X, x)*Heaviside(x^7-5*x^4-3*x+1), x = -a .. a)], [a > 10]); limit(%, a = infinity); evalf(%)

-1/2+(1/2)*erf(-(1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, -.8961211535)+(1/3)*2^(1/2))-(1/2)*erf(-(1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, .3166780086)+(1/3)*2^(1/2))+(1/2)*erf((1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, 1.759427884)-(1/3)*2^(1/2))

-0.850712015e-1

`assuming`([int(PDF(X, x)*convert(Heaviside(x^7-5*x^4-3*x+1), piecewise), x = -a .. a)], [a > 10]); limit(%, a = infinity); evalf(%)

(1/2)*erf(-(1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, index = 5)+(1/3)*2^(1/2))-(1/2)*erf(-(1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, index = 1)+(1/3)*2^(1/2))-(1/2)*erf((1/3)*2^(1/2)*RootOf(_Z^7-5*_Z^4-3*_Z+1, index = 2)-(1/3)*2^(1/2))+1/2

.5275852105

 

Download Bug_HS_PDF.mw

@Mohamed19 Yes, your earlier claim was wrong.

Your latest claim is also wrong.

@Christian Wolinski Your first suggestion is correct.

output=':-Q'

@Stretto I realize that this is going to sound crazy, but... there are actually two different kinds of file that Maple uses on MS-Windows, both of which are named maple.ini .

One of these contains saved preferences for the Java GUI. That's the one you've described. That's not the one that you need here.

What you want is a file that contains only plaintext Maple commands (or is empty). The online help for that is indeed topic worksheet/reference/initialization, as you found. You can create this file in one of the locations listed on that help page.

I suggest that you go with choice 3). I suggest that you do not mess around with maplejava.i4j.ini and try and change any location setting. You just need a file maple.ini in the folder that Maple thinks is your "home directory". It'll be a location similar to C:\\Users\userid\maple.ini but of course userid will be different.

You can even issue the Maple command  kernelopts(homedir)  to discover what Maple thinks is your home directory.

 

 

The simplest example I have so far is:

restart;

expr := (7 + a/b)/(1 + c/d):

latex( expr );
{1 \left( 7+{\frac {a}{b}} \right)  \left( 1+{\frac {c}{d}} \right) ^{
-1}}

The problem seems to be due to weak coding in procedure `latex/latex/*`.

Specifically, line 43 is a general else fallback, without any consideration for the special case that local numShort could be equal to 1.

showstat(`latex/latex/*`,42..43);

`latex/latex/*` := proc(e)
local subexp, den, ee, ff, subee, i, k, num, texlist, `\\,`, `\\frac `, `\\sqrt `, 
  `{`, `}`, ccnt, keepcnt, ll, nlist, numTall, numShort, denTall, denShort;
global _LatexSmallFractionConstant;
       ...
  42           texlist := '`{`', '`(`', `latex/print`(numShort), '`)`', 
                 texlist, '`}`'
           else
  43           texlist := '`{`', `latex/print`(numShort), texlist, '`}`'
       ...
end proc

If I replace that else with elif numShort<>1 then the errant 1 is not present in the generated LaTeX. I will test some more examples, and try and form a FromInert/ToInert hotfix.

This would not address my other concern, that the denominator renders like (den)^(-1) instead of within \frac{...}{den} . That'd likely require a deeper rewrite of this routine.

@Mohamed19 Simply read the help page for the diff command.

@Carl Love Thanks, Carl.

I've fixed it. (It didn't change that example's generated plot -- just the name in the unevaluated name case.)

First 209 210 211 212 213 214 215 Last Page 211 of 594