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

Upload and attach your full code (eg. in a .mw worksheet).

@Stretto I see, you just need an animation inside Maple.

I thought you wanted to export to a movie file, because I read this -- literally -- in your Question's title, "create movi".

You might Explore a call to IterativeMaps:-Bifurcation, or any procedure which returns images. And you can use an option to have that "play" the images in succession. (There's an example of that in the
  ?examples,Explore
page, using Mandelbrot.)

But the play-rate is determined by how quickly the images are generated. So if Bifurcation computes them slowly then you may need to compute them up front, store in a table, and then Explore calls to a short procedure which simple picks them off that table using argument i::posint.

I would have to poke around, to discover inefficiency in Bifurcation, and unfortunately I don't have time for that this week, sorry,

I converted your query from a Post to a Question.

Why do you submit every single query as a Post, instead of a Question? It is inconsiderate and impolite, since you've been politely asked about this several times.

I changed the Product from "Maple 16" to "Maple 2016", since that's the version in which your attachment was last saved.

I recall doing something like that for myself, a long time ago. I'd have to dig out the details.

In the meantime, perhaps you could supply the basic information of your Maple version and Operating System? If you do then I shall adjust the headings of this Question accordingly.

I get results true and false, respectively, for your two examples. I'm using 64bit Linux.

@digerdiga I am wondering whether you are specifying it backwards.

Consider your shorter followup example. It doesn't make sense to collect wrt `x` and then expect the common `a` term to be factored out -- since the terms with powers of `x` will be handled separately. Instead, collect first wrt `a`.

g := a*x*(x+1);
                        g := a x (x + 1)

collect(g,[a,x])
                           / 2    \  
                           \x  + x/ a

As for your primary example, are you looking for one of the last two of these?

restart;

f:= c/(c - 1) - c*(Pi^2 - 12*ln(c))*(1 + c)/(12*(c - 1)^3*n)
+ (((144*c^3 + 1584*c^2 + 1584*c + 144)*ln(c)^2
- 24*Pi^2*(1 + c)*(c^2 + 10*c + 1)*ln(c)
+ (-96*c^3 - 288*c^2 + 288*c + 96)*Zeta(3)
+ Pi^2*((Pi^2 + 24)*c^3 + (11*Pi^2 + 72)*c^2
+ (11*Pi^2 - 72)*c + Pi^2 - 24))*c)/(288*(c - 1)^5*n^2):

 

of:=[op(f)]:
add(collect~(of, c, simplify));

c/(c-1)-(1/12)*c*(Pi^2-12*ln(c))*(1+c)/((c-1)^3*n)+(1/288)*((Pi^4+24*Pi^2-96*Zeta(3)+144*ln(c)^2-24*Pi^2*ln(c))*c^3+(11*Pi^4+72*Pi^2-288*Zeta(3)+1584*ln(c)^2-264*Pi^2*ln(c))*c^2+(11*Pi^4-72*Pi^2+288*Zeta(3)+1584*ln(c)^2-264*Pi^2*ln(c))*c+Pi^4-24*Pi^2+96*Zeta(3)+144*ln(c)^2-24*Pi^2*ln(c))*c/((c-1)^5*n^2)

collect(f,[n,c],simplify);

c/(c-1)-(1/12)*c*(Pi^2-12*ln(c))*(1+c)/((c-1)^3*n)+(1/288)*((Pi^4+24*Pi^2-96*Zeta(3)+144*ln(c)^2-24*Pi^2*ln(c))*c^3+(11*Pi^4+72*Pi^2-288*Zeta(3)+1584*ln(c)^2-264*Pi^2*ln(c))*c^2+(11*Pi^4-72*Pi^2+288*Zeta(3)+1584*ln(c)^2-264*Pi^2*ln(c))*c+Pi^4-24*Pi^2+96*Zeta(3)+144*ln(c)^2-24*Pi^2*ln(c))*c/((c-1)^5*n^2)

collect(f,[n,c]);

c/(c-1)-(1/12)*c*(Pi^2-12*ln(c))*(1+c)/((c-1)^3*n)+(1/288)*((144*ln(c)^2-24*Pi^2*ln(c)-96*Zeta(3)+Pi^2*(Pi^2+24))*c^3+(1584*ln(c)^2-264*Pi^2*ln(c)-288*Zeta(3)+Pi^2*(11*Pi^2+72))*c^2+(1584*ln(c)^2-264*Pi^2*ln(c)+288*Zeta(3)+Pi^2*(11*Pi^2-72))*c+144*ln(c)^2-24*Pi^2*ln(c)+96*Zeta(3)+Pi^2*(Pi^2-24))*c/((c-1)^5*n^2)

 

Download collect_nc.mw

@permanoon123 What do you want to export and to which Excel file, each time through the loop? Do you want it to append to the same Excel file? Please be clear.

 

@digerdiga I shall leave any clarifying comments on your Question.

What is the target expression, explicitly? It may be clear in your mind, but I have not yet seen it.

For example, when you write, "for the third term I would actually mean this" do you mean that is what you want, or what you don't want?

I have deleted my Answer, since it seems to me that the question is still not being explained properly, ie. with the goal explicitly or clearly described.

 

@nm Last year I reported that kind of problematic example with fractions and LaTeX export. (If I recall correctly, it was about the time that your issue with an extraneous factor of 1 in LaTeX output was reported.)

@macrobbair I find it very difficult to take seriously your issue when you keep failing to provide meaningful details.

I cannot make proper sense of this, the only snippet of detail that you've provided so far:
    `What is does is take the whole of the previous "Z=X+Y" and
  add it to the new A thus "A+Z=X+Y" instead of "A+Z"'

Why do you not try and isolate the problematic Matrix behavior, that reproduces the issue while not giving away precious details of your secret project work?

Perhaps you have set up some Matrices with a recursive definition.

But how can you reasonably expect us to suggest a concrere revision, when all you provide is a nebulous description? It it not reasonable.

 

@BarKop That option is spelled summarize.

You can also get programmatic access to additional details such as the "rsquared" statistic, etc, using the solutionmodule output.

restart;

Rok := Vector([2013, 2014, 2015, 2016, 2017, 2018], datatype = float):
TrzbyCelkemEmco := Vector([1028155, 1134120, 1004758, 929584, 995716, 1152042], datatype = float):

Sol := Statistics:-PolynomialFit(3, Rok, TrzbyCelkemEmco, x, svdtolerance=1e-20,
                               summarize, output=solutionmodule):

Summary:
----------------
Model: -.14312624e15+.21307569e12*x-.10573703e9*x^2+17490.365*x^3
----------------
Coefficients:
              Estimate            Std. Error            t-value  P(>|t|)
Parameter 1   -143126242466195.0625    46387428274554.6406     -3.0855   0.0909
Parameter 2    213075694358.4329       69046084657.8044         3.0860   0.0909
Parameter 3   -105737030.9423          34257558.0979           -3.0865   0.0909
Parameter 4    17490.3649              5665.6838                3.0871   0.0909
----------------
R-squared: 0.8874, Adjusted R-squared: 0.7185

Sol:-Results("rsquared");

HFloat(0.8873925487823793)

Sol:-Results("rsquaredadjusted");

HFloat(0.7184813719559482)

W := Sol:-Results("leastsquaresfunction");
 

-HFloat(1.4312624246619506e14)+HFloat(2.1307569435843292e11)*x-HFloat(1.0573703094228968e8)*x^2+HFloat(17490.364890056557)*x^3

# Same as earlier, using W
#p1:=plot(W,x=min(Rok)..max(Rok),color=blue):
#p2:=plot(Rok,TrzbyCelkemEmco,style=point,symbol=solidcircle,symbolsize=15):
#plots:-display(p1,p2,view=min(TrzbyCelkemEmco)..max(TrzbyCelkemEmco),size=[500,400]);

 


 

Download svdfit_solmod.mw

@Joe Riel I thought that you were describing incorrect behavior, ie. a bug. The example that you've shown  in your last Comment contains correct output, unless I'm missing some point.

But the original behavior shown -- with the Typesetting stuff -- was clearly incorrect and illustrates a bug.

If the OP was trying to ask something about the output from statements within do-loops then it could have been stated more clearly (because it is not specific to rand, etc). In that case, sure, terminating the end do with a colon, or setting printlevel, etc, could be appropriate.

This is interesting, and will require a careful read. Thank you.

I have been reading posts over at the Wolfram Community site, for the past few weeks. In particular:
 - Robert Rimmer's articles, including here (updated here), and here (related to here).
 - Robert Nachbar's article here on epidemiological models.
 - Vitaliy Kaurov's compendium article here.

[edit] An interesting and more recent post (by the aforementioned Robert Rimmer) on a logistic growth model is here.

@Joe Riel Hi Joe, please could you be more specific about what's still added, and with examples (regressions, or not)? Thanks.

First 189 190 191 192 193 194 195 Last Page 191 of 594