Carl Love

Carl Love

28055 Reputation

25 Badges

13 years, 0 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

Your command works for me. Try doing a restart first; perhaps something has inadvertently been assigned to a or b.

@Mac Dude You wrote:

In Maple, you pick whether to use a common server for all worksheets or separate servers in the preferences.

Not true: There's a third choice in the Preferences: "Ask each time a new worksheet is created." If you make this choice, then you can select for each worksheet at the time of its creaton either a new server or one of the existing servers for the other open worksheets.

 

I find it a little hard to believe that your original Matrix is

A:=Matrix([[Matrix[[a,b],[c,d]]], [Matrix[[e,f],g,h]] ])

Are you sure that you have the parentheses and square brackets correct on that? Perhaps it's like this:

A:= Matrix([Matrix([[a,b],[c,d]]), Matrix([[e,f],[g,h]])]);

The original syntax that you gave is possible, but I find it unlikely.

If the message is as Tom Leslie suggests (which seems like a good guess except that the "1%" still has me baffled), then the solution is simple: just continue with your computation. Note that the message isn't an error, or even a warning. Maple has sucessfully computed the output and simply chooses (based on your interface settings) not to display it. And what's the point of looking at an output that can run on for hundreds of pages (I've seen one that was 4000+ pages---a single algebraic expression)? Just go on to the next step of your computation.

@tomleslie 

The cubic spline of y as a function of x isn't the inverse of the spline of x as a function of y, even with exact computation (which Maple is happy to do in this case). I'm not saying that you thought that it was. However, it may be desirable that getx and gety be inverses of each other. Consider these plots of the relative deviation from the true inverse:

plot(x-> (getx(gety(x)) - x)/x, (min..max)(xlist));
plot(y-> (gety(getx(y)) - y)/y, (min..max)(ylist));

To make them inverses, I'd use your gety and define

getx:= y-> fsolve(gety(x)=y);

If you now check the above two plots (which takes longer due to the slowness of fsolveing for every point), the relative deviations are all on the order of 10^(1-Digits) or less---what's expected for this type of numeric computation.

You may be more comfortable with this if you verify that gety is a strictly increasing, hence invertible, function. This plot shows that it is:

plot(D(gety), (min..max)(xlist))


@krismalo 

You may be more satisfied with getx as I defined it immediately above.

@farzane 

Okay, so now we've eliminated t. That leaves four variables (y[a], y[b], y[c], and x) and two equations. Theoretically, we could use one of the equations to eliminate one of y[a], y[b], or y[c] from the other equation. That'd leave us with an equation containing, say, y[a], y[b], and x. So, theoretically, I could make a 3D plot of, say, y[a] vs. x and y[b], but I couldn't make a 2D plot of y[a] vs. x alone. So, do you want such 3D plots? I emphasize theoretically because I have no idea whether the computations are numerically feasible.

@Preben Alsholm 

I think that what is meant is "4 amperes at 120 degrees plus 2.5 amperes at 60 degrees."

Do you mean a long program in a Maple worksheet? Would you please post the worksheet? Use the green up arrow that is the last item on the second row of the toolbar in the MaplePrimes editor.

@necron 

G5O and g5 are syntactically different. The former is a procedure of two arguments, t and x; the latter is an expression in t and x. Using the expression G5O(t,x) with symbolic t or x will expand it to an expression again (numerically equivalent to g5) and negate the optimization. We need two more layers of procedural nesting (one for t, one for x) to effectively use G5O for numeric integration so that it'll not be called with symbolic arguments. So, use this for E2:

E2:= t-> evalf(Int(x-> G5O(t,x), 0..100, epsilon= 1e-4)):

You can keep your plot command the same. The 50-point plot will take about two minutes, (which is actually about a factor-of-70 improvement over your original). I don't know if it makes a difference, but I had Digits (not digits) set to 15 for the above. So, if it doesn't work, set 

Digits:= 15:

and try again.

 

@Markiyan Hirnyk 

That works too. I tend to write code closer to the kernel, and I'd forgotten about the writedata command, which is simply a Maple-coded command which makes several calls to fprintf with its arcane format codes (see showstat(writedata, 26), for example). I also personally loathe making a conversion to the old-style matrices.

But, certainly, it's an easier command to remember, and I'd recommend it to the OP.

(Note also that ExportMatrix is a high-level command which (through a chain of procedures and modules several layers deep) simply makes a call to fprintf using the newer { } format codes described on the help page that I mentioned.)

@Markiyan Hirnyk 

What I have given is a standard command for the plaintext output of matrices. It's used (as fprintf(...)), for example, when you want to send matrix output to a textfile and maintain a columnar format. See ?rtable_printf. The cryptic notation originated in the C language I believe, and it's implemented in Maple's kernel.

Your usage of "intersect" is a bit confusing. The given graph doesn't intersect the coordinate axes at all. Do you mean "What x value on the graph corresponds to y = 1.5?" and "What y value on the graph corresponds to x = 3000?"? 

There are three options:

  1. Do you want to ask those questions with repect to the piecewise-linear curve that is precisely defined by your data? This can be done straightforward.
  2. Do you want to interpolate the data with a smooth curve that passes exactly through the data points? The most common choice for such a curve is a cubic spline. Once you make the choice of degree, the computation is straightforward.
  3. Do you want to fit a parametrized model curve to the points, choosing parameters such that the curve doesn't necessarily go through the points but such that the residuals are minimized by some measure? This is called regression. It's by no means straightforward, but it's the most common choice.

@Boby 

I am not familiar with your solution technique, and I am skeptical about your purpose in using it. Why don't you just use standard numerical techniques for IVPs? They work fine on this problem.

@Axel Vogt You wrote:

 I understand that the user is responsible to provide an according sequence of points ... it 'only' connects the points given in the list according to its ordering - yes?

Yes, exactly. It's GIGO (Garbage In --> Garbage Out).

@JonMcLoone You wrote:

Perhaps my presence here is unwelcome, so I shall not comment on the subjective arguments that it contains.

 Your presence here is most welcome, and I look forward to your future comments.

First 461 462 463 464 465 466 467 Last Page 463 of 709