Fernando Ismael

60 Reputation

4 Badges

16 years, 282 days

MaplePrimes Activity


These are questions asked by

Suppose I have a variable (a) and I want it to print true in red if it is greater than one and false in blue otherwise. What would be the corresponding code?

How to replace the symbols “true” with t and “false” with f in the output of the following code:

with(Logic);

TruthTable(a &xor b)

I tried the following but it didn't work.
subs([true = t, false = f], TruthTable(a &xor b));

Hi everybody and thank you all in advanced.

I tried this:

  1. convert([a,b],`*`) # this worked
  2. convert([a,b],`/`) # this gives an error
  3. map(`/`,a,b) # this worked

Questions:

  1. How can I make code for point (2) work? Apparently `/` is not an option for convert.
  2. I was looking for a function that divide two symbols, something like divide(a,b) and outputs a/b for some simple
  3. programing purposes but find no one. (a,b) could be numbers, could be trig functions or polynomials.

    Of course, you can just input a/b or lis[i]/lis[i+n], but a knowledgeable answer to this will cast light over Maple’s ways and my wrong ways.

Hi everybody and thank you all in advance.

This is my question. Suppose I have a list of lists like this:

[[1,2,3],[7,8,9],[13,12,11]]

I want to select all 3rd element from the list of lists and get:

[3,9,11]

Another example:

[1, [2, 3], [4, [5, 6], 7], [8, 3], 9] and select the first element from the list of lists and get:

[1, 2, 4, 8, 9]

Additionally suppose I want to sort a list of lists but base on the 3rd element of every sublist. Example:

From this list:

[[1,2,3],[7,8,2],[13,12,1]] sorted by the  3rd element I would get:

[[13,12,1], [7,8,2], [1,2,3]]

 

As always, thank you all in advanced.

I found this challenge by chance.

solve 615+x^2=2^y over integers.

I rushed to Maple and tried to solve it  with “solve” and "assuming" but I did not get results.

solve(615+x^2=2^y) assuming x::integer,y::integer   did not work.

How could this equation be suitably formulated for Maple to solve it?
 

 

1 2 3 Page 1 of 3