Carl Love

Carl Love

28115 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@MuriloLobo Your question is now well formed to me. Thank you.

To answer your question, would it be acceptable to generate a normal Normal sample with given mean and sd and then trim off the values that lie outside the 95% bounds? Do you want it trimmed on bottom end also?

I executed your worksheet twice using the menu command Edit -> Execute -> Worksheet and I cannot reproduce your problem. I get fully displayed matrices.

@Christopher2222 Are you referring to

kernelopts(limitjvmheap= true);
kernelopts(jvmheaplimit= 2000*Unit(mebibyte));

?

@Joe Riel Joe, see the Wikipedia article "Longest common subsequence problem". The command StringTools:-LongestCommonSubsequnce would return the characterwise longest common subsequence. What Markiyan wants is the wordwise longest common subsequence.

I am adapting the algorithm described in the Wikipedia article. The first step is to break the strings into Arrays of words.

Definitions: For a positive integer n, let [n] denote {1, 2, ..., n}. Define a (finite) sequence as a function f: [n]-> A for some n and some set A. Define the length of f to be n. Let n, A, and sequence f be given. Let S be a subset of [n]. Let O: [|S|]->  S be the unique increasing bijection determined by S. Then g:= f@O is the subsequence of f determined by S. Note that g is itself a sequence as defined above. Note that g: [|S|]-> A and thus, when viewed as a sequence, g does not depend on S, merely on |S|.

Let f1 and f2 be two sequences, and let g1 and g2 be respective subsequences. If g1 = g2 (as sequences), then g1 is a common subsequence of f1 and f2.

@Mac Dude To my mind, the original question and the followup both make no sense. So I can't really say that the Question has been Answered, although the Replies do contain some useful information for the OP. I am waiting for a reformulation of the original question.

@MTata94 Change ln to log10 in my code. I already updated the Answer. If I do this, then I get 1860.633190 for evalf(Fi(30)).

@MTata94 Use evalf(Fi(30)) instead of Fi(30).

You should show your erroneous code. I am sure that we could correct it.

@shingy Shingy, you need to begin your session with the command

with(PDEtools);

otherwise Maple cannot find the DeterminePDE command.

An alternative is to type the fully qualified command name (i.e., including the module prefix PDEtools:- ) at each invocation, which is what Edgardo did:

PDEtools:-DeterminePDE(equ,  integrabilityconditions= false);

@mehdi jafari But the OP needs a programmatic way to do it---explicitly with Maple commands. This is easy with plotsetup and plotoptions, as in the Answer by itsme.

@Muhammad Usman 

The algorithm is fine, but its coding needs to be retrofitted for your older Maple 13, which doesn't have the numelems command. Try this:

B:= proc(X::{Vector,list})
local n;
     n:= `if`(X::list, nops(X), op(1,X));
     LinearAlgebra:-Determinant(
          Matrix(
               n,
               (i,j)-> `if`(j < i, -1, binomial(n-i,j-i)*X[j-i+1]),
               shape= Hessenberg[upper]
          )
      )
end proc:

@ecterrab There are five places in your Answer where there is supposed to be some Maple code but it is missing. Please edit the Answer to include the code. Plaintext of the code is fine.

@DJJerome1976 Depending on the input mode being used, it may be necessary to express y'(x) as either diff(y(x), x) or D(y)(x).

@mehdi jafari It is important to point out to the student that Maple, which is working in the complex domain, will not put the arguments to ln in abs. I.e., Maple's answers will contain, for example, ln(x) even though the correct answer in the real domain expresses this as ln(abs(x)). I noticed that the multiple-choice answers in the student's assignment make the fine distinction between lns with and without abs.

Also, note the power of the implicit option to dsolve. This will put the answers in a form much closer to those multiple-choice answers.

@Michael The syntax in m mod n. The parentheses around n are superfluous. So the syntax is the same as any other spelled-out binary operator, such as union, in, etc. The premature evaluation is the intended behavior. mod is intended for symbolic computation. For pure integer calculation the command is irem.

First 546 547 548 549 550 551 552 Last Page 548 of 710