anonymous
  • anonymous
MATLAB101 help D: I'll attached the problem below.
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
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
anonymous
  • anonymous
...a little bit of hints, maybe?
dan815
  • dan815
okay so

Looking for something else?

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

More answers

dan815
  • dan815
u have a 50 by 50 matrix and what are we trying do here with peaks function?
anonymous
  • anonymous
from what I understand, i have to make the 50 by 50 matrices using the "peaks" function. What's a peak function anyway?
dan815
  • dan815
www.mathworks.com/help/matlab/ref/peaks.html
anonymous
  • anonymous
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
dan815
  • dan815
im looking it up
dan815
  • dan815
do u hae some data set of some function i can use peaks on?
kva1992
  • kva1992
I believe you should be using the Z=peaks(x,y)
kva1992
  • kva1992
dont quote me but im pretty sure
dan815
  • dan815
okay
dan815
  • dan815
what is x and y
anonymous
  • anonymous
no i don't have any set of data.. if i did that, this is how it will look like:
1 Attachment
anonymous
  • anonymous
is it supposed to be like that? O.o
kva1992
  • kva1992
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.
kva1992
  • kva1992
so if im not misinterpreting that your x and y are 50
dan815
  • dan815
x and y are both 50 by 50 matrices?
kva1992
  • kva1992
gimme a second lol i may be mistaken
dan815
  • dan815
oh crapp i cant use peaks i accidentally named some other program peaks, i gotta put in that program in for peaks again
anonymous
  • anonymous
wait i'm confused now, do i need to define x and y with some function?
dan815
  • dan815
can you open your peaks function code
kva1992
  • kva1992
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
dan815
  • dan815
ok nvm i just renamed the file i can use peaks again
dan815
  • dan815
http://prntscr.com/8pzvg0
dan815
  • dan815
like that?
kva1992
  • kva1992
yup thats what it should look like from what i have knowledge of
anonymous
  • anonymous
did you do z=peaks(50) figure mesh(Z) ?
dan815
  • dan815
>> [X,Y,Z]=peaks(50) >> surf(X,Y,Z)
anonymous
  • anonymous
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
dan815
  • dan815
[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)
dan815
  • dan815
u should mess around with it like
dan815
  • dan815
what happens when you put in a meshed grid 50 by 50 for peaks
anonymous
  • anonymous
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
anonymous
  • anonymous
quick question, are your matrices like the list of numbers/data showing on your command window?
anonymous
  • anonymous
1 Attachment

Looking for something else?

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