Fernando Ismael

55 Reputation

4 Badges

15 years, 360 days

MaplePrimes Activity


These are questions asked by

Hi there. Thank you all in advanced.

The general question is how to pass a pair of values to a list of functions that expect that pair of values as input.
I already know this solution for passing a list of values to a list of functions that expect one value as input.

map(eval~,[f(x),g(x)],x=~[p,q,t])

Well f(x) and g(x) take every element of the list, but what if f(x) and g(x) expect two values. The concrete case is to pass p and q to iquo and irem. The following were my tries:

  • map(eval~,[iquo(x),irem(x)],x=[p,q])
  • map(eval~,[iquo(x),irem(x)],x=(p,q))
  • map(eval~,[iquo(op(x)),irem(op(x))],x=[p,q])

I searched and found some partial related topics in the site but not quite with this approach.

 

Hi, everybody.

Is there a command or a way to assign an initial value to animate plot?

Trivial example:

animate(plot,[m*x,x=-10..10],m=-10..10)

but initial value for m would be m=1 so the initial render will present the line with slope 1.

As always, thank you all in advanced.

 

Hello everybody.

This is my question. I tried to evaluate a list of polynomial over a list of values. Something like this:

eval([a*x, b*x], x = [p, q, t])

to get something like this:

[[a*p, a*q, a*t], [b*p, b*q, b*t]]

I know this method: eval~(a*x,x=~[p,q,t])  though this works for one polynomial over a list of values. Not precisely, what I am looking for.

I figured out a method that worked defining functions and with ‘apply’ and ‘map’. Here an example:

m:=t->3*2^t:

n:=t->(t+4)^2:

map(apply~,[m,n],[1,2,3]);

[[6, 12, 24], [25, 72, 147]]

However, how can I get this result using the ‘eval’ function.

Thank you all in advanced for any contribution.

I want to divide every element of A1 list by every element of list A2. Lists are unequal length.

Example:

A1:= [a1, a2, a3];

A2:= [b1, b2];

Output would be:

[a1/b1, a2/b1, a3/b1, a1/b2, a2/b2, a3/b2]

I managed to do this by this means:

LinearAlgebra:-OuterProductMatrix([a1, a2, a3], [1/b1, 1/b2]); convert(%, list)

My questions are:

  1. Is there a more succinct, practical method?
  2. How about if I want to use a different operation like say adding or just use a function f?

Thank you all in advanced.

1 2 Page 2 of 2