Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

need help with this maple question on sequences, finding it hard to turn the whole bunch of functions into a single maple function.

To answer this question you need to create a Maple function using Maple's arrow (->) notation. Your function should take a Maple list of real numbers as its input and return the smallest cosine from that list.

share|improve this question

closed as off topic by lhf, M Turgeon, William, userNaN, Chris Eagle Oct 6 '12 at 11:56

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Someone voted to close. Perhaps he thinks this is a programming question, not a math question ... For Maple programming questions you could try Maple Primes mapleprimes.com –  GEdgar Sep 26 '12 at 15:05

3 Answers 3

Respecting whether the entries of the list are exact or floating-point,

f := L -> min(map(cos,L));
share|improve this answer

Try this:

f:=L->min(seq(evalf(cos(L[i]))),i=1..nops(L));
f([1,3,5,7*Pi/2,-5,Pi]);
share|improve this answer

Been playing around and i found the answer, thanks people but i think this seems simpler in syntax.

G:=F->min(evalf(seq(cos(x),x=F)));
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.