Results 1 to 2 of 2

Math Help - I have been told my answer to this matlab question is wrong

  1. #1
    Senior Member
    Joined
    Oct 2008
    Posts
    393

    I have been told my answer to this matlab question is wrong

    I have got to create a set of n = 51 points on a grid L(h,x0), characterize by the parameters h = 1 and x0=0, where the second co-ordinate is given by the expression



    f(x) =sin(x) + eta*0.1

    where -1< eta < 1 is a random deviate (use the function rand to generate such a deviate).

    This is what i have done but i have been told it is wrong, have i answered the question?

    x = 0:1:50;
    eta = 2*rand(size(x))-1;
    y = sin(x) + (eta*0.1)

    Im not sure if i have done the grid right, i guessed it meant start at 0 and go up 1, 51 times.

    Thanks for your help in advance.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by adam_leeds View Post
    I have got to create a set of n = 51 points on a grid L(h,x0), characterize by the parameters h = 1 and x0=0, where the second co-ordinate is given by the expression



    f(x) =sin(x) + eta*0.1


    where -1< eta < 1 is a random deviate (use the function rand to generate such a deviate).

    This is what i have done but i have been told it is wrong, have i answered the question?

    x = 0:1:50;
    eta = 2*rand(size(x))-1;
    y = sin(x) + (eta*0.1)

    Im not sure if i have done the grid right, i guessed it meant start at 0 and go up 1, 51 times.

    Thanks for your help in advance.
    The wording of your question is unclear, as far as I can see your code could be a realisation of what you have been asked for. Please post the original question with its exact wording.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 5
    Last Post: January 26th 2011, 11:51 AM
  2. Replies: 2
    Last Post: November 15th 2010, 06:41 PM
  3. Replies: 8
    Last Post: June 6th 2009, 07:26 PM
  4. Wrong answer key or wrong me ?
    Posted in the Algebra Forum
    Replies: 2
    Last Post: July 2nd 2008, 04:42 AM
  5. I keep getting wrong answer for sim[;e physics
    Posted in the Math Topics Forum
    Replies: 4
    Last Post: January 22nd 2007, 02:14 PM

Search Tags


/mathhelpforum @mathhelpforum