acer

31344 Reputation

29 Badges

19 years, 119 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

What is the current value returned by currentdir()? Is it pointing to a folder which is writable by you?

Did you perhaps want to export it as an .xls Excel file?

@salim-barzani You can put your followup queries on this topic here, or Branch from here.

That relates/connects the previous content and answers.

You've been asked this before, on at least three occasions.

@dharr In the old Classic GUI (ie. The GUI, pre-Maple 9) the algorithm that divvied up the subexpressions was better. And line-breaks worked well.

ps. It would be useful if there were a function that estimated pixel-width for the 2D Math pretty-printing of an expression.

@salim-barzani I can't read that expression, from that grainy image. And I'm not going to type it in, even if I could read it.

You can put that line-break example in a Maple worksheet, with just the problematic expression.

You don't need to add all the code to construct the expressions; just include the express that produces LaTeX as you want with the line-break, and the expanded form that has the line-break.

But if you don't provide the problem example in explicit Maple then I won't work on it.

Do you want to reduce the size of the expression?

Or do you have some special favoring of collecting wrt B[1] and B[2], and only want to deal with common numeric coefficients?

I ask, because it's possible to get a smaller collected result.

What can you tell us about the variables?

Are any purely real? Are any positive? Are any less than -1? etc.

@imparter You'd need to ensure that the file location is writable for you.

I just gave the filename "imparter.xls", so that would end up in whatever folder is the current working directory -- see the output from the Maple command currentdir.

I cannot tell whether the (default) location happens to be writable by you.

You haven't indicated your operating system, or where you want the file to be created. It could be,
   "C::/Users/imparter/foobar/imparter.xls"      MS-Windows
or,
    "/home/imparter/foobar/imparter.xls"            Linux
or something else that you choose.

You could set currentdir(...), and then pass just a plain file name to the Export command. Or you could pass a fully qualified name, eg. "C::/blah/blech/etc.xls" or whatever is appropriate for your OS.

@C_R My motivation in asking is that it is not clear that you even have to use subsop. I can think of three scenarios in which one might think it is necessary even though it is not.

But since you have declined to provide a representative example of your current process I shall walk away.

ps. Before you posted this Question I had obtained a speed-up in that earlier Question thread, using evalhf (avoiding a few pitfalls; eg. like dharr I had concluded that reducing the total number of exp calls might be crucial).

But I am still hunting for still more overwhelmingly large gains in that example, on top of the items to which I alluded in that earlier Question thread including: expression "simplification", procedure optimization (codegen), hardware float evaluation, and parallelism.

pps. Additionally, option hfloat is not always as fast as evalhf (though sometimes it is).

You could show here a (small, manageable) example-to-reproduce of your procedure construction.

An interesting followup might be a query something like:

  For t=0..10 what is the smallest Ua value such that T(t)<398.15 ?

FindingExtractingvaluesdsolvewithspecificconditions_acc.mw

For fun, I'll add that you might also be able to use the D form as intermediary. Eg,

ee := diff(diff(w[2](x[1],t),t$2),x[1]);

diff(diff(diff(w[2](x[1], t), t), t), x[1])


I'll do split both steps below into two lines (each), just to illustrate
what's going one.

You might manipulate/work with this form until ready.

convert(ee,D);

temp2 := eval(%,x[1]=L[b1]);

(D[1, 2, 2](w[2]))(x[1], t)

(D[1, 2, 2](w[2]))(L[b1], t)

When ready...

eval(temp2,L[b1]=5);

convert(%,diff);

(D[1, 2, 2](w[2]))(5, t)

eval(diff(diff(diff(w[2](t1, t), t), t), t1), {t1 = 5})


note: name t1 serves the same purposes as does dummy x[1].

Download Eval_eval_D.mw

This way can also be done by extracting the D[1,2,2](w[2]) on it's own. You can then apply that to whatever two arguments you wish; in some cases you could get by above without the evals.

@Gabriel Barcellos With those few additional details it seems as if one place to start is in the speed of evaluation of the equations themselves.

You write that the equations are "really big". But that is not enough information to know whether their evaluation is memory bound (inadequate RAM leading to the OS needing to swap out active memory, etc). The equations could fit in memory and still be very time-consuming to evaluate at numeric values of the unknowns. As yet, we readers cannot know.

You might focus on the performance of a single of those fsolve calls, and then later try to parallelize mutiple such fsolve calls.

Perhaps the equations can be simplified or reduced in size. Perhaps all or parts of them can be evaluated under evalhf or Compiler:-Compile'd. Perhaps they have common subexpressions. And so on.

It's not easy to be more specific without actually seeing the full code to reproduce. Is there a reason why you cannot upload and attach it here (green up-arrow in Mapleprimes editor)?

@Andiguys You can add sliders for other parameters, after removing them from your DATA list.

It turns out that you can get an explicit formula for that A12=1 intercept. (But even if not easily found explicitly, you could construct a simple proc that fsolve'd for it...) You can even add it to the plot.

question_plot_slider_acc.mw

@lemelinm Yes, or put it in,

   "C:\Users\userid\maple.ini"

if you want it to work for you in other versions. Naturally, edit the "userid" appropriately.

@lemelinm You have mistakenly tried to put the commands into the GUI's stored preferences file.

Instead, put the Maple commands into an user initialization file at one of these locations (for MS-Windows, choice 3)  is common).

The mistake is quite understandable and common, since the two kinds of file unfortunately can have the same filename on MS-Windows.

The Help page for initialization files is pretty clear. It has sections explaining the choices, for each of MS-Windows, Linux, and OSX (Mac). Many people are able to figure it out by merely reading this page, ie. without a video.

3 4 5 6 7 8 9 Last Page 5 of 574