A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • one year ago

MATLAB101 help D: I'll attached the problem below.

  • This Question is Closed
  1. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I just wanted to see how this will look like. Don't show me the code (I have to figure this one out), just show me your output, so that I can have an idea.

    1 Attachment
  2. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ...a little bit of hints, maybe?

  3. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    okay so

  4. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    u have a 50 by 50 matrix and what are we trying do here with peaks function?

  5. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    from what I understand, i have to make the 50 by 50 matrices using the "peaks" function. What's a peak function anyway?

  6. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    www.mathworks.com/help/matlab/ref/peaks.html

  7. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah I read that. I'm not sure if I should do Z=peaks(x,y) or do z=peaks(50), x=peaks(50), y=peaks(50) because it says "Use the peaks function to define X,Y,Z" not sure what this part actually means

  8. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    im looking it up

  9. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    do u hae some data set of some function i can use peaks on?

  10. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    I believe you should be using the Z=peaks(x,y)

  11. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    dont quote me but im pretty sure

  12. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    okay

  13. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    what is x and y

  14. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    no i don't have any set of data.. if i did that, this is how it will look like:

    1 Attachment
  15. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    is it supposed to be like that? O.o

  16. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    Z = peaks(X,Y); evaluates peaks at the given X and Y (which must be the same size) and returns a matrix the same size.

  17. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    so if im not misinterpreting that your x and y are 50

  18. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    x and y are both 50 by 50 matrices?

  19. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    gimme a second lol i may be mistaken

  20. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    oh crapp i cant use peaks i accidentally named some other program peaks, i gotta put in that program in for peaks again

  21. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    wait i'm confused now, do i need to define x and y with some function?

  22. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    can you open your peaks function code

  23. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    well if we are basing it off the definition then yes you have to define the x and y and they both must be the same value

  24. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    ok nvm i just renamed the file i can use peaks again

  25. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    http://prntscr.com/8pzvg0

  26. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    like that?

  27. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    yup thats what it should look like from what i have knowledge of

  28. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    did you do z=peaks(50) figure mesh(Z) ?

  29. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    >> [X,Y,Z]=peaks(50) >> surf(X,Y,Z)

  30. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    surf(x,y,z) isn't the x and y here represents the matrix then z will be the color of data and the surface height? okay. thank you, i think i got it now :D

  31. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    [X,Y,Z] = peaks(...); returns two additional matrices, X and Y, for parametric plots, for example, surf(X,Y,Z,del2(Z)). If not given as input, the underlying matrices X and Y are [X,Y] = meshgrid(V,V)

  32. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    u should mess around with it like

  33. dan815
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    what happens when you put in a meshed grid 50 by 50 for peaks

  34. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ok, i'll try that. I already get the idea, so I think I can manage it now I'll ask again if I got stuck or confused :P

  35. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    quick question, are your matrices like the list of numbers/data showing on your command window?

  36. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    1 Attachment
  37. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.