Carl Love

Carl Love

28100 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@henrylyl 

If you define pG:= Array(1..3) followed by pG:= foo, then pG is no longer an Array; it becomes whatever type of object foo is. In your code foo was a list. If you use an index, as in pG[1]:= foo, then pG is still an Array.

In your example above, your Array declaration is wrong. It should be expr1:= Array(1..2, [x^2, x]), which can be abbreviated to Array([x^2, x]). Effectively the same is expr1:= < x^2, x >.

@henrylyl My experimenting shows that the option useunits= [Unit(A), Unit(B)] only affects how the axes are labelled. It does not convert the units, like you said. You can wrap the expression being plotted with a convert command.

@henrylyl 

A^%T means the transpose of A. I used it to convert a column vector to a row vector.

The shortcut to create a row vector is < x | y | z >. In prefix form that would be `<|>`(x,y,z).

If you had made pG in the same manner as G, then the code to display the Array of plots would be simply

display(< display~(G), display~(pG) >);

But the way that your code was, pG was a list, not an Array.

You could guess at the general form of the curve and then apply regression through Statistics:-Fit. Can you post a worksheet with the plot so that I can extract the data from it?

@henrylyl I don't know about the units conversion in plots. The answer may be on the help page ?plot,units . There is a lot of information there, and I don't fully understand it yet. I need to do some experiments.

Regarding your other question about displaying the array of plots, it can be done like this:

display(< display~(G), display~(< pG[] >)^%T >);

Do you have a numeric value for Pr?

Do you have any initial or boundary conditions? You'll need eight.

@bastorer 

It should work the way that you describe. But if Array2:= Copy(Array1) does not give an error message, then you can't be using ArrayTools:-Copy. Can you duplicate the situation?

@Preben Alsholm That works!

@bastorer

Array2:= Copy(Array1);

is not valid syntax for ArrayTools:-Copy. You must have another package loaded that has a Copy command.

@henrylyl The file link works now.

@Preben Alsholm It doesn't work recursively. Example:

restart:
Array1:= Array([Array([1, 2]), Array([3, 4])]):
Array2:= copy(Array1):
Array1[1][1]:= 11:
Array1;
Array2;
              

That was asked and answered 10 days ago, probably by a classmate of yours. See here.

@Markiyan Hirnyk 

I see your point. I wonder why the presence of r with no assumptions makes Maple think that it knows the integral.

@henrylyl File didn't attach. Try uploading again please.

First 557 558 559 560 561 562 563 Last Page 559 of 709