Results 1 to 2 of 2

Math Help - EvenQ and If in mathmatica

  1. #1
    Newbie
    Joined
    Oct 2012
    From
    Denmark
    Posts
    17

    EvenQ and If in mathmatica

    How do i write mathmatica to give me only the even numbers from a list n., so i could use those number for further calculation.

    I tried
    If[EvenQ[n],1,0]


    But the problem here is that it only gives me 1 and 0 out.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Oct 2012
    From
    Denmark
    Posts
    17

    Re: EvenQ and If in mathmatica

    ok.. i come so far now..
    MK[d_] := Cases[d, x /; EvenQ[d]]

    but how do i make able to give me an output which gives me all the even numbers within range[d]
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Mathmatica data for regression
    Posted in the Math Software Forum
    Replies: 3
    Last Post: January 3rd 2011, 05:32 AM
  2. Mathmatica Paragraph Formating
    Posted in the Math Software Forum
    Replies: 0
    Last Post: November 20th 2010, 06:21 PM
  3. Mathmatica help, Riemann Sums
    Posted in the Math Software Forum
    Replies: 0
    Last Post: December 2nd 2009, 01:12 PM

Search Tags


/mathhelpforum @mathhelpforum