Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk 

It is obvious that Preben did not intend for his code to be executed in isolation but rather using the OP's definition of unitcircle. If you do it that it way then it runs fine.

@H-R Thank you. You now have enough reputation to vote.

@H-R Yes, the operand numbers of a function never change. In f(a,b), the f is operand 0, a is operand 1, and b is operand 2. For nonassociative infix operators that only take two operands (=, <=, <, >, >=, .., ::, ^), operand 1 is always the left side.

So, if the left side of BC4 will always be the sum (and only the sum), then op([1,1], BC4) will safely extract the operand of the sum. This operand is a product (of type `*`). The select command will select factors of that product based on a boolean condition. The condition is that the factor has a subexpression of type sinh(algebraic), which means the function sinh applied to any single type algebraic argument. See ?select , ?hastype , ?type,algebraic , ?type,structure .

Please supply the code for function f. If I change your f to something simple like 1, then I do not get white lines.

Do the white lines appear on the plot in the worksheet? Or do they only appear after you've transferred the plot somewhere else?

The order of terms in some expressions such as polynomials is not fixed in Maple. However, if you apply the sort command to a polynomial, then the order (and hence the operand numbers) are definite.

For a more detailed analysis of your situation, please post your code in plaintext form or as an attached worksheet.

When I enter your code like this, I have no problem.

Vp:= [bF*F*(1-F/kF)+mu*FI,
     bv1*V1*(1-V1/kV1),
     bv2*V2*(1-V2/kV2), 0, 0, 0];

VectorCalculus:-Jacobian(Vp, [FS, V1S, V2S, FI, VII, V2I]);

But there must have been some preliminary code that you had. Otherwise the Jacobian is trivial because your expression Vp doesn't contain the variables FS, V1S, V2S, VII, or V2I.

So, please post your complete code in plaintext form or as an attached worksheet so that I don't have to retype it.

Please post the code that generates the Matrix. At first glance it looks like the problem is possibly that you are using lists instead of Vectors or Matrices.

@Markiyan Hirnyk Okay, yes, I converted the general formulas for slope and tangent line from Cartesian to polar. But I did not use Cartesian coordinates in the way that the OP objected to: I did not convert anything from polar to rectangular, and I plotted the line in polar.

The OP wrote:

How can I avoid having to convert everyting to rectangular coords, and plot the tangent line in polars?

 

The first answer that Maple gave you is not really wrong. It is an indeterminate form: 0*infinity. That just means that it will take more work to get the answer. Using combine or another simplifier is the best thing you could do.

@Markiyan Hirnyk Do you doubt that that's the tangent line in vector form? T[2] is equivalent to the OP's expression for the tangent line.

@casperyc

Exchange the roles of newdata and data, and then you only need one change in your code at the top. But call it something sensible like data_name:

mysum:= proc(data_name::evaln(list))
local
       data:= eval(data_name)
,
#
# other locals stay the same
#

;
#
# rest of code is exactly the same
#
end proc:

@mahmood180 You see, these comments get lost and forgotten if you don't Post them as separate Questions.

@mahmood180 Please post this as a separate Question. And we can't answer "Is this the right one?" unless you also post a problem with the putative answer.

@Joe Riel You wrote:

Suppose you are creating m lists, each with n elements and collecting them into a set. Assume all lists are different. With Maple's approach the cost of this, I think, is O(m*n)

Sets are stored sorted in Maple, not just hashed, so there are logarithmic factors involved; so, O(m*ln(m)*n), assuming an optimal sorting algorithm. A logarithmic factor is only a small difference though.

@AM So, you see that the question has been answered, right? In modern Maple:

S:= {parse(cat(convert(M^%T, list)[]))};

And for earlier Maple, follow the solution of Kitonum.

Showing explictly what each step does:


M:= < 1,1,1 ; 2,2,2 ; 3,3,3 >;

M := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 1, (1, 3) = 1, (2, 1) = 2, (2, 2) = 2, (2, 3) = 2, (3, 1) = 3, (3, 2) = 3, (3, 3) = 3})

M^%T;

Matrix(3, 3, {(1, 1) = 1, (1, 2) = 2, (1, 3) = 3, (2, 1) = 1, (2, 2) = 2, (2, 3) = 3, (3, 1) = 1, (3, 2) = 2, (3, 3) = 3})

convert(%, list);

[1, 1, 1, 2, 2, 2, 3, 3, 3]

%[];

1, 1, 1, 2, 2, 2, 3, 3, 3

cat(%);

`111222333`

parse(%);

111222333

{%};

{111222333}

 


Download parse_matrix.mw

First 529 530 531 532 533 534 535 Last Page 531 of 709